March 03, 2011

Debugging ASP.NET Application events

Lately, I've been working on some ASP.NET sites. I wanted to debug items that get created during the Application.* events (in this case, OnStart specifically).

Sadly, if you just put a breakpoint in the code and hit F5, you get the maddening experience of the debugger not stopping on your breakpoint.

Thankfully, through the magic of System.Diagnostics.Debugger.Break(), you can force a window to popup, asking which version of Visual Studio you want to attach as a debugger!

Happy debugging!
jk

3 comments:

Admin said...

Following searching Google I found your site. I think both are great and I is going to be coming back again to you and them in the long term. Thanks

Rabia Tareen said...
This comment has been removed by the author.
Unknown said...

Hi, I do believe this is a great site. I stumbledupon it
I am going to come back once again since i have saved as a favorite it.
http://www.seoacer.com/blog/