Summary


Visual Studio is the state-of-the-art debugger on the market today. Microsoft listened to developers and produced a debugger that makes some extremely difficult problems much easier to debug. This chapter introduced all the tricks for setting advanced breakpoints and using the amazing Watch window in managed code, especially concentrating on those new options introduced with Visual Studio 2005. As you've seen, the debugger can do a considerable amount of work for you if you know how to utilize it effectively. You should strive to make the most of the Visual Studio debugger so that you can minimize the time you spend in it.

Advanced breakpoints help you avoid tedious debugging sessions by allowing you to specify the exact conditions under which a breakpoint triggers. The location breakpoint modifiers, hit counts, and condition expressions are your best friends, mainly because the breakpoint modifiers will save you a huge amount of time since they'll allow you to use the debugger more efficiently. I strongly encourage you to play with them a bit so that you can see what you can and can't do, thus avoiding having to learn their idiosyncrasies under extreme pressure.

With the special capabilities of the Watch window family, you should have no trouble quickly and efficiently seeing the key data you need at an instant, be it in a DataTip or in the Watch window itself. Make sure to take advantage of the DebuggerDisplayAttribute and the Data Visualizers to make it easy for others (and yourself!) to see your data with a minimum of fuss. Finally, the ability to quickly call and debug a method from the Immediate window is a huge boon to productivity that we've needed for a long time.




Debugging Microsoft  .NET 2.0 Applications
Debugging Microsoft .NET 2.0 Applications
ISBN: 0735622027
EAN: 2147483647
Year: 2006
Pages: 99
Authors: John Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net