Since this morning, I can't debug my console application anymore in Visual Studio. I've clean the solution, even delete the entire Debug folder but when I try to run in Debug, a new tab opens with the following message:
Source Not Available
Source information is missing from the debug information for this module.
You can view disassembly in the Disassembly window. To always view disassembly for missing source files, change the setting in the Option dialog.
There is also a pop up window saying:
Unhandled exception at 0x766FC69B (shell32.dll) in sfi.exe: 0xC0000005: Access violation reading location 0x00000004. occurred
My attempts so far
Following some comments, in the Exception Settings, I've unticked EVERY single exceptions, it didn't resolve anything.
I tried clicking on Continue but give up after the 30 consecutive F5 clicks.
Close VS 2017, log out, reboot, the bug is still there.
Anyone know how to get the Debug mode back in Visual Studio?
Related
I use visual studio 2019 with iisexpress and swagger to test out my APIs, it used to work just fine whenever an error popped in swagger it would show me where the error came from and details about it, then I had to click continue in order to return the error to swagger.
So, whether be it a user handled exception or a common runtime language exception, visual studio used to give me information about that error before it showed it to the user.
However something changed with my settings and now the error doesn't show in my IDE anymore, it directly returns it to swagger which is making my job impossible.
What I have tried so far: Enabling/Disabling Just My Code, reloading symbols, checking that project is running with debug mode. All answers that I found here did not work for me.
If it is of any help, my breakpoints hit normally.
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.
I already created an application with the function that could view the database through that application. When on the Visual Studio 2010 (Haven't released yet), the application that I made run smoothly and no error found. But, when I released it and made a Set-up and install it on my computer and when I run the program and click the view database, it gave the error "Object reference not set to an instance of an object, but when I check back in the Visual Studio 2010, the error didn't appear and run smoothly. Just when I install the application, the error appears.
This is the error that I am getting when run the application through installed program, not through Visual Studio 2010 (Debugging):
When I click "Continue", the program run as it is and run smoothly, I just wondering why this error appears only at the installed program, not in the debugging.
Anyone know how would that happen?
Here is the details:
It's quite likely that something got optimized away by the compiler when building in release mode, which can cause surprises at runtime. Perhaps one of your object is being initialized by a side-effect that the compiler "optimized away".
One easy way to try to get to the bottom of the problem is to wrap the call to the offending method in a try/catch, and when catching the exception, pop it up along with a full stack trace in a message box. What you're interested in is the line number where the null reference exception is actually occurring. Or better yet, write it out to a log file with any additional information you would like to know about at runtime. Then, redeploy your application, reinstall it, and give it another go. Once you figure out which object is not being initialized, then you will want to analyze your code to see why that would happen only in release builds and not in debug builds. You should look to see if you're using some sort of pattern (or anti-pattern) where it could affect other places in your code.
when i start visual studio 2010 c# .. and open my application i got this. it stopped responding and gives me that message in the picture once my application is opened but other application works fine.
then i debug visual studio 2010 .. and i got the exception
Unhandled exception at 0x76a0b9bc in devenv.exe: 0xE0434352: 0xe0434352.
EDIT: i tried to open the .exe file in project folder in debug folder and i got this.
how to fix that ? what should i do ?
thanks in advance.
Visual Studio is vulnerable to certain exceptions that are raised in design mode. Hard to categorize them, it is an immediate crash to the desktop. The exception code says as much, 0xe0434352 is a low-level managed code exception. You'd normally work around it by checking-in an earlier revision of your control and pay extra attention to code that needs to be disabled at design time by checking the DesignMode property. Your screenshot shows as much, seems like the control is actively displaying runtime info while in design mode. Risky.
If you want to debug it then you can by starting another instance of Visual Studio and use Tools + Attach to Process to attach to the first one (devenv.exe). Debug + Exceptions, tick the Thrown boxes for CLR exceptions and Win32 exceptions. Switch back to the first instance and load your project.
i've figured out what happened .. my form got 3 usercontrol that i made before.. one of those usercontrol has a customized progressBar which is a library .. for some reason that library stopped working .. so i removed it .. then added again from that usercontrol .. then the application worked.
I am not able to run my Unit Tests in Visual Studio 2010 due to an error which occurs when I try to Run Test or open any test windows, such as Test > Windows > Test Results. An error message popups up saying "Exception has been thrown by the target of an invocation".
Everything I've read online says it's related to being disconnected from a Team Foundation Server (TFS) but I've never used TFS. I've also heard that closing all instances of Visual Studio and restarting it will help. Tried that. I've also restarted my machine. No luck. I've had this happen a few times in the past as well and I don't know what makes it go away.
Does anyone know what might be causing this?
The solution I'm working in has several projects, including a WCF service, a Window Server, several other libraries and the test project. However, now, when I start Visual Studio without even opening my solution and try to open Test > Windows > Test Results it throws the error.
I was getting this error when I start the second IDE of VS 2010/2012 but when I restart the explorer.exe it works very fine.
Open task manager
Process tab -> find explorer.exe
Do end Process
Go to Applications tab -> New Task... -> type explorer.exe
Wait til Task Bar become visible.
Now start VS. I hope you won't get any error.
After two days of trying, the only solution that work for me was removing the folder C:\Users\xxx\%AppData%\Roaming\Microsoft\VisualStudio\10.0
I successfully solved this issue by opening the Team Explorer while the was NO project loaded in Visual Studio. Never saw the problem since.
instead of deleting entire VisualStudio directory under AppData\Roaming\Microsoft, I just deleted "Team Explorer" inside. now I don't get the exception.