VS.Net 2008 Windows 7 调试环境 [英] VS.Net 2008 Windows 7 Debug Environment

查看:24
本文介绍了VS.Net 2008 Windows 7 调试环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将所有 Windows XP 生产应用程序转换为 Windows 7,但遇到了一些问题.

I'm converting all of my Windows XP production applications to Windows 7 and I am having a couple of problems.

1:每当我遇到错误时,在 XP 机器上,它会中断执行并在有问题的代码行上停止.在 Windows 7 中,它只是抛出一个通用异常,我不知道出现错误的代码行在哪里.非常令人沮丧.

1: Whenever I get an error, on the XP machines, it breaks execution and stops on the line of code with the problem. In Windows 7, it just throws a generic exception and I have no idea where the line of code with the error took place. Very frustrating.

2:在 XP 中,如果我放置断点或跟随代码,我可以在运行代码时即时编辑更改.如果我在 Windows 7 中尝试这样做,它会说 64 位应用程序不允许这样做.再次,非常令人沮丧.

2: In XP, I can edit changes on the fly while I am running code if I place breakpoints or follow along the code. If I try that in Windows 7, it says that's not allowed with 64 bit applications. Again, very frustrating.

是否有解决这些问题或至少解决这些问题的想法?

Any ideas for fixing these problems or at least working around them?

推荐答案

一般来说,这两个平台之间的调试器行为不应该有任何差异.以下是我的建议:

There shouldn't be any difference in the debugger's behavior between those two platforms, generally speaking. Here are my suggestions:

  1. 根据您的描述,我无法确定调试器是否确实因第一次机会异常而中断并且没有找到源代码(也许没有找到符号/不匹配?)根本没有打破.如果是前者,请检查调试 -> Windows -> 模块"并验证是否为相关模块加载了符号.如果是后者,也许 Windows XP 上的调试器被配置为在第一次机会异常时中断,而 Windows 7 上的调试器则没有?比较Debug -> Exceptions"下的设置,看看是否有任何差异.请注意,如果您在工具 -> 选项 -> 调试 -> 常规"中启用了仅我的代码",这也会影响调试器在第一次机会异常时的破坏行为.

  1. From your description, I can't ascertain whether or not the debugger did break on a first chance exception and it didn't find source (perhaps the symbols weren't found / were mismatched?) or if it didn't break at all. If the former, check "Debug -> Windows -> Modules" and verify that the symbols were loaded for the module in question. If the latter, perhaps the debugger on Windows XP was configured to break on a first chance exception while the debugger on Windows 7 was not? Compare the settings under "Debug -> Exceptions" to see if there are any differences. Note that if you have "Just My Code" enabled in "Tools -> Options -> Debugging -> General", this can also affect the breaking behavior of the debugger on first chance exceptions.

64 位进程不支持编辑并继续"功能,因此当您在调试 64 位进程时尝试修改源代码时,调试器会通知您.这可能是运行应用程序的AnyCPU"(我的猜测)或x64"构建的结果.编辑和继续工作的唯一方法是调试 32 位进程;这可以通过在构建 -> 配置管理器"中将目标平台更改为x86"来实现(如果平台不在列表中,则添加该平台).这当然假设您的应用程序不依赖于 64 位模块.

The Edit and Continue feature is not supported for 64-bit processes, so the debugger will notify you when you attempt to modify the source code when debugging a 64-bit process. This is likely the result of running an "AnyCPU" (my guess) or "x64" build of your application. The only way for edit and continue to work is to debug a 32-bit process; this can be accomplished by changing the target platform to "x86" in "Build -> Configuration Manager" (add the platform if it isn't in the list). This of course assumes your application is not dependent upon 64-bit modules.

这篇关于VS.Net 2008 Windows 7 调试环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆