简体   繁体   中英

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. 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

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.

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.

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!):

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.

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

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.NETFramework\\DbgManagedDebugger

If your computer is running a 64-bit operating system, delete the following registry keys also:

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

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.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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