Reputation: 141
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.
Upvotes: 12
Views: 8155
Reputation: 3802
Try This
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.
Upvotes: 4
Reputation: 65
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.
Upvotes: 0
Reputation: 5696
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/
Upvotes: 2
Reputation: 480
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 :)
Upvotes: 0
Reputation: 981
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.
Upvotes: 0