简体   繁体   English

Visual Studio调试器的问题

[英]Issue with Visual Studio debugger

While debugging through the code, I am getting following error. 在通过代码调试时,我遇到了以下错误。

A debugger is attached to w3wp.exe but not configured to debug this unhandled exception. 调试器附加到w3wp.exe但未配置为调试此未处理的异常。 To debug this exception, detach the current debugger. 要调试此异常,请分离当前调试器。

I tried the fix from the following link, but it won't work for me. 我尝试从以下链接修复,但它不适合我。 http://social.msdn.microsoft.com/Forums/vstudio/en-US/373e738f-1bc7-4dcb-88b4-ee8e78d72dc1/an-unhandled-exception-was-raised-from-microsoft-net-framework-v-10-11-or-20-but-the-current?forum=vsdebug http://social.msdn.microsoft.com/Forums/vstudio/en-US/373e738f-1bc7-4dcb-88b4-ee8e78d72dc1/an-unhandled-exception-was-raised-from-microsoft-net-framework-v- 10-11或20-但-的电流?论坛= vsdebug

It works fine when I use Visual Studio 2012, but it fails when using Visual Studio 2013. I tried repairing Visual Studio 2013, but It never worked. 它在我使用Visual Studio 2012时工作正常,但在使用Visual Studio 2013时失败。我尝试修复Visual Studio 2013,但它从未起作用。

Do anybody know the fix for it? 有人知道修复它吗?

Thanks. 谢谢。

Try This 尝试这个

  • Go to Project Properties 转到项目属性
  • Debug 调试
  • Change Debug type to Mixed(managed and native) from managed only for both Application and Background process. 仅为应用程序和后台进程将调试类型从托管更改为混合(托管和本机)。

You may be encountering this issue if you have native C code (unmanaged) and C# (managed) code in the same project. 如果您在同一项目中具有本机C代码(非托管)和C#(托管)代码,则可能会遇到此问题。

Changing the debug type to mixed makes debugging significantly slow. 将调试类型更改为混合使调试速度显着降低。

I've just had this issue and it was solved by enabling 32 bit applications on the website's App Pool, as detailed here (thanks Colm!): 我刚刚遇到了这个问题,它通过在网站的应用程序池上启用32位应用程序来解决,详见此处(感谢Colm!):

http://colmprunty1.azurewebsites.net/a-debugger-is-attached-to-w3wp-exe/ http://colmprunty1.azurewebsites.net/a-debugger-is-attached-to-w3wp-exe/

Sounds like maybe you have just in time debugging turned on. 听起来好像你刚刚及时打开调试。 Your program throws and exception that your current debugger is not configured to handle and perhaps the system is launching the just in time debugger. 您的程序抛出异常,而您当前的调试器未配置为处理,并且系统可能正在启动即时调试器。 This is a registry setting but can also be controlled via options in Visual Studio. 这是一个注册表设置,但也可以通过Visual Studio中的选项进行控制。

http://msdn.microsoft.com/en-us/library/k8kf6y2a(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/k8kf6y2a(v=vs.85).aspx

To disable Just-In-Time debugging by editing the registry 通过编辑注册表来禁用实时调试

On the Start menu, search for and run regedit.exe 在“开始”菜单上,搜索并运行regedit.exe

In the Registry Editor window, locate and delete the follow registry keys: 在“注册表编辑器”窗口中,找到并删除以下注册表项:

HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\Debugger HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ Windows NT \\ CurrentVersion \\ AeDebug \\ Debugger

HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft.NETFramework\\DbgManagedDebugger HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft.NETFramework \\ DbgManagedDebugger

If your computer is running a 64-bit operating system, delete the following registry keys also: 如果您的计算机运行的是64位操作系统,请同时删除以下注册表项:

HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\Debugger HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Wow6432Node \\ Microsoft \\ Windows NT \\ CurrentVersion \\ AeDebug \\ Debugger

HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft.NETFramework\\DbgManagedDebugger HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Wow6432Node \\ Microsoft.NETFramework \\ DbgManagedDebugger

Take care not to accidentally delete or change any other registry keys. 注意不要意外删除或更改任何其他注册表项。

Close the Registy Editor window. 关闭Registy Editor窗口。

Had the same problem. 有同样的问题。 Got this message all the time I wanted to start my app in debug-mode. 我一直想在调试模式下启动我的应用程序时收到此消息。 Turned out the problem was, that I still had appverifier ( http://msdn.microsoft.com/de-de/library/windows/hardware/ff538115(v=vs.85).aspx ) linked to my app. 原来问题是,我仍然有链接到我的应用程序的appverifier( http://msdn.microsoft.com/de-de/library/windows/hardware/ff538115 (v=vs.85) .aspx )。 Once unlinked everything went back to normal and I could debug normally. 一旦取消链接,一切都恢复正常,我可以正常调试。

Not sure if anything to do with your problem. 不确定是否与您的问题有关。 Just saying :) 只是说:)

Are you able to modify the source code so that it thows a meaningful exception? 您是否能够修改源代码以使其产生有意义的异常?

Also try to recompile the source with VS 2013 and check if the debugger runs fine this time. 还尝试使用VS 2013重新编译源代码并检查此次调试器是否正常运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM