Is there a way to debug an already running application compiled in release mode?

I have a window service at dotnet that currently hangs but works. Anyway, to attach a debugger to it despite the lack of symbols; and that it is already working?

+1


source to share


3 answers


Ignore the "no symbols" warning. Once you plug in the built-in debugger (I prefer WinDbg for this kind of thing), download the SoS tools package:

.loadby sos mscorwks

      



You can now get the managed column using the command !clrstack

, and hopefully this gives you enough information to figure out what is going on. Here's a handy cheat sheet with a few others if that doesn't do it for you.

It won't help you this time, but ... get in the habit of enabling symbol file generation for debug build and release. There is no reason not to do this, and it will make your life easier in these situations.

+5


source


From MS dev IDE Debug -> Processes -> Attach (After selecting a process.) You may have to click on the "show system processes" button. There can't be any useful information though ...



+2


source


Here is sample code, links to tools, and presentations on how to debug a proven .NET process .

You will probably also want to watch this video presentation , which features the same tools and samples. Despite the Swedish text on the webpage, the video is in English.

+2


source







All Articles