Visual studio 2005 hangs when debugging - debugging

Visual studio debugger hangs while loading symbols for my application(native IA64), SP1 is installed. This started to occur, after i install debugging tools for windows(64 bit version), and reboot my computer. This issue is not depend on my project, even with new project debugger hangs.
UPDATE:
When i try to attach to the running process, the same situation repeats. Visual studio hangs while loading symbols(for kernell32.dll)

symsrv.dll is responsible for loading symbols from a symbol server - you might try renaming the one installed by Debugging Tools for Windows and see if the VS debugger starts working again.

Is it completely hanging, or just taking a long time to load the symbols?
If you using a symbol server to access debug symbols for the Windows DLLs, VS2005 can try to access the symbol server every time you debug.
The way around this is to load the symbols once, and then uncheck the symbol server URL under Tools->Options->Debugging->Symbols. As long as the OS libraries haven't changed since you last downloaded the symbols, there's no reason to access the remote server every time.
Also see this answer.

Related

Visual Studio Community 2015 slow debugging

I have recently bought new laptop:Hp specter x360 i7-6500 with 8gb RAM.
I have installed Visual Studios 2015 Community in an offline mode, later I updated it.I am currently working in c# window forms.
The point is when I press the button 'Start Debugging', VS build the program in normal speed, but it takes like 10-15 sec to show the output, even for the small programs. This whole thing is for first time debugging after code editing, if I close it and run it again without changing the code, it shows the output on the spot.
And if I run the same program in my old laptop, which has lower specs and same VS, that laptop show the result much quicker.
Based on your screenshot, I see that VS tries to download PDB symbols for system assemblies, which are used by your application. Loading the debug symbols provides simplify debugging of an application but it also slows down the application loading.
You can change symbols loading settings, in the Tools-Options-Debugging-Symbols menu of Visual Studio. Here you can disable symbol loading (if you would use this option you need to load symbols manually using the Debugging-Windows-Modules interface). Or exclude system modules which usually are not necessary to debug a common application.
Check this blog post which provides a great description about how VS uses debug symbols.

Visual Studio 2010 loads symbols too slowly when debug mixed application

I'm using Visual Studio 2010 to debug a mixed application. When I attach to that process(Managed + Native), the VS is hung. Then 30 minutes later(not exactly this time, but it's really long), it comes back.
Anybody know how to resolve this?Thanks in advance!
I have 'Delete all breakpoint', tried repair VS and so on. The issue still exists.
I would guess you have a symbol server that is dead and VS is still trying to get symbols from it / VS is hitting the MS symbols server which is a slow operation / VS is not finding the symbols in the paths you have, but is still trying to hit them every time and that takes forever (both known issues that we fixed in VS 2012)
If you don't need any symbols - I would do what Hans suggested - Tool/Options/Debugging/Symbols uncheck all symbol servers, plus choose Automatically load symbols for: Only specified modules and specify your modules in that list (it can be empty as well) -> this will work if your app is trying to load a lot of symbols that you don't need. And you can later load them manually (the ones you want) from the Modules window

Message: "Visual Studio Remote Debugging Monitor has stopped working" on x64 debugging

Since this morning I keep getting this same message "Visual Studio Remote Debugging Monitor has stopped working" and no matter how many times I restart VS or Windows, that doesn't help. Unfortunately I must use x64 debugging due to third party components. I had no significant changes on the system. From last time everything worked fine.
I've seen this question
VS2008: Unable to start debugging, Remote Debugging Monitor has been closed
and it helped me to understand what is happening but doesn't help me fix the problem...
I am debugging x64 app in local and remote debugger snaps always at the same point of the app start up. The other application still works fine.
Does anyone have some solution for this?
I had a similar debugger issue where details showed that "Fault Module Name" is SYMSRV.dll. So I've fixed that by ticking off "Microsoft Symbol Servers" (Tools->Options->Debugging->Symbols) and cleaning symbols cache.
Sorry, I'm not good at English. I had the same problem. It only happened on my workstation win7 VS2010+SP1. I found that it happened when the program trying to load the assembly "EnterpriseLibrary.ExceptionHandling.Logging.Configuration.Design.dll". Strangely, this assembly references itself! so when the program execution is passing through the statement Assembly.Load("EnterpriseLibrary.ExceptionHandling.Logging.Configuration.Design") in debug mode, the msvsmon.exe crashes with this error message: "visual studio remote debugging monitor has stopped working".
Go to “Start > Run”. Type the following path and hit Enter
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe

Visual Studio 2008 debug error

I have a very annoying issue with visual studio 2008 sp1 on windows 7 64 bit.
The software we are working on uses a client that connects to a windows service. so, when i do a debug, i debug on 2 processes, the client and the service.
When hitting a breakpoint on the service, and using F10, F11 for 20-30 times aprox, I get an "Visual Studio is busy doing an internal operation ..." message, after which the debugger throws me to another place. If I look at the call stack, there is a message "Evaluation of:". above it, the call stack where I currently am, and below it, there is the call stack where I was before the error occurred.
here is something similar: http://social.msdn.microsoft.com/Forums/en-MY/vsdebug/thread/4c30e3f4-587e-4f14-8cec-8663d268c55c
I tried installing latest updates, cleaning solution, deleting dll files, *ncb, *suo. nothing worked :|
It's not related to the wpf editor bug.
Thanks.
This is barely an answer, but I had the same problem with VS 2008 (updated to KB972221) running on 32-bit Windows XP.
The key seems to be running two instances of VS2008 at the same time.
I had a client/server setup and was running each of these executables via its own VS2008 instance. The server was multi-threaded, the client I think single-threaded.
Like you, I had set a breakpoint and was then F10 stepping through the code when I had the same experience of VS hanging for a while then dumping me elsewhere in the code following an Evaluation of: message in the call stack.
However, I changed to simply running the client executable on its own, with just the server running in debug mode with VS2008, and the problem never recurred (to date!).
So maybe the workaround is simply to stick to a single VS2008 session.

How to disable symbol loading when debugging a Visual C++ program?

I am using Visual Studio 2008. I don't need to debug some DLLs in my project, so can I disable symbol loading when debugging a Visual C++ program? Does it help to make startup time faster when debugging?
The symbols are all local, so I don't have those slow loading problem, just want to make debugging faster and faster.
For example I am using Qt libraries, when I hit "Starting Debugging", the Output window shows that the symbols for Qt libraries are loaded. If VS can stop loading those symbols, the debugging startup time should be faster. Of course, I still want VS to load symbol for my executable.
Just found out that Visual Studio 2010 actually do what I want.
To load only the symbol for your executable file, without loading other symbols (eg: DLLs):
Go to Tools->Options->Debugging->Symbols
Click "Only specified modules"
Clear "Always load symbols located next to modules"
Click "Specify modules"
Click the new icon
Enter your executable filename (eg: my-awesome-app.exe)
Also found out that Visual Studio 2010 seems to perform better than Visual Studio 2008 when debugging. At least the IDE layout switches back faster when the debugging is stopped.
I am not sure what you mean by 'startup'. I assume you are talking about the launching of the actual application. The time to launch the target application is expensive regardless of mode you launch it. It may be less in Release but that will be negligible.
Turning off all symbol paths as mentioned in the other solution is a viable option. However, I am not sure why you are debugging if you do not want symbols for your launched application. Without the applications symbols you will not be able to see where you are in the source code when you are debugging.
If you are looking for a faster debugging experience you can use WinDbg. It comes with the Windows SDK but can also be downloaded seperately. If is a faster UI than Visual Studio, but it is much more cumbersome to use if you are more comfortable with a GUI. WinDbg uses commands to perform almost all tasks, but you can do some great debugging and it is faster in many cases compared to Visual Studio. In the event you want to debug C++\CLI or any managed application (e.g. C#), I would stick with Visual Studio. There is an extension in WinDbg called SOS, but it requires some advanced debugging experience to use correctly.

Resources