应用程序已停止工作 - 无法附加 VS2010 调试器
我正在尝试调试一个崩溃的程序。在正常情况下,当程序崩溃时,我可以从“应用程序已停止工作”对话框附加一个调试器,您可以在其中在线检查解决方案、关闭程序或调试。
当我单击“调试”时,会弹出另一个对话框,要求我选择调试器 - 我选择 Visual Studio 2010 的新实例或现有实例。调试器启动,然后出现另一个应用程序崩溃对话框,要求我选择调试器,其中说“.NET 4.0 代码抛出异常,当前调试器配置为调试 .NET 1.0、1.1 和 2.0 代码”。 VS2010 的另一个实例启动,显示“无法附加到崩溃的进程。调试器已附加”。 (第一个)。
我还可以尝试哪些其他方法来调试程序?
I'm trying to debug a program which crashes. In normal circumstances, when the program crashes, I can attach a debugger from an "Application has stopped working" dialog, where you can check online for a solution, close the program or debug.
When I click debug, another dialog pops up asking me to choose a debugger - I pick a new or existing instance of Visual Studio 2010. Debugger launches, then I get another appcrash dialog asking me for debugger, which says "Exception is being thrown from .NET 4.0 code, current debugger is configured to debug .NET 1.0, 1.1 and 2.0 code". Another instance of VS2010 launches, which says "unable to attach to crashing process. A debugger is already attached". (the 1st one).
What other things can I try to debug the program?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不简单地在附加 VS 调试器的情况下运行程序直到程序崩溃呢?
或者,当您的程序崩溃时,您可以在任务管理器中右键单击您的进程并生成转储文件(我认为这从 Windows Vista 开始可用,但您也可以使用 ProcessExplorer - 这适用于所有版本的 Windows)。然后,您可以在 VS 2010 中加载此转储文件,它应该直接指向崩溃的根源。
Why don't you simply run your program with the VS Debugger attached until it crashes?
Alternatively when your program crashes you can right click your process in the task manager and generate a dump file (this is available starting with Windows Vista I think but you can also use ProcessExplorer for this - this will work for all versions of Windows). You can then load this dump file in VS 2010, it should point you directly to the source of the crash.
我最终所做的是将位置写入“devenv.exe” - Visual Studio 2010 shell
强制应用程序在调试器中启动。
What I eventually did was to write location to "devenv.exe" - Visual Studio 2010 shell to
That forced the app to start in the debugger.