When Windbg chokes PDF Print E-mail

Windbg is a pretty good debugger but sometimes it runs into troubles. I've mentioned before the SOS extension to use when debugging managed code. The combination, Windbg plus Sos, is probably the most powerful tool to track hard to find bugs. If Windbg stops with a "Loader lock" exception when it starts running your app, you can set the environment variable COMPLUS_MDA to zero (e.g. type "set COMPLUS_MDA=0" in a command shell before lauching windbg). Then I found that the Sos command !eestack will display (managed) stacks info when sometimes Windbg ~*k gets lost.

So a short Windbg for managed code might go like:

Start Windbg and attach to a running managed app.
Type: ".loadby sos mscorwks"
Type: !bpmd <assembly name> <class.method name>
Type: g, then at the break point.
Type !eestack

With the other common Sos commands, !dumpheap, !clrstack, !threads and !do you can have a very precise picture of the application conditions.
 




Bookmark it...
Digg!Reddit!Del.icio.us!Google!Facebook!Slashdot!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!
 
< Prev   Next >
Joomla Template by Joomlashack
Joomla Templates by JoomlaShack Joomla Templates by Compass Design