Author: Tess | Posted on: 6/5/2008 6:51:21 AM | Views : 935

I recently received a question from a reader who wanted to know how to set breakpoints in code for applications that crash on startup.
The email went like this:
I have a .NET app which is crashing upon startup (it even causes DW20.exe to make an appearance). When I open the .NET app in Windbg, I can see exactly what the exception is and where it happens.
What I would like to do is put a breakpoint on the method where the exception is being raised so that I can step through it. This is where I'm stuck.
I'm familiar with commands such as !name2ee and !bpmd., however, when I load the .NET app, I don't get a chance to set the breakpoint since the exception happens so early in startup code of the app. It's like as soon as Windbg finishes loading modules, the exception strikes. It would be different if this was code running after a button click, but since this runs at startup, I'm having difficulties.
...

Go to the complete details ...