ASP.NET Hosting

View exception information while debugging in Visual Studio

I had met that one once, but I had forgotten it existed... Really useful! But somewhat a hidden treasure.

Thanks shaykatc for the tip about $exception:

In Visual Studio 2003, the debugger team put in a little feature called $exception. The next time you crash in C# or J# go ahead and dismiss the dialog. Open the locals window and take a peek at $exception there (chills are setting in right now). Expand it and you can see all the delightful things inside the Exception object - Messages, Stacktrace, Inner Exception etc - everything you would have gotten had you put a try catch around the code and caught the exception object. Is that cool or what?

No Comments