Summary


Although managed code is terrific because we no longer have to mess with memory corruptions and leaks, we still have to know how to use the debugging features. In this chapter, I concentrated on the unique issues associated with Visual Studio .NET and debugging managed applications.

I started by discussing the issues particular to advanced breakpoints. It's absolutely wonderful that Visual Studio .NET can call methods and properties from conditional breakpoints, but it means you must be extra careful to avoid causing side effects in your breakpoints. Also remember that if you mess up the condition, the debugger won't stop if it can't properly evaluate the condition.

The exciting Watch window offers all sorts of extra power for managed applications. With its full expression evaluator, you can easily call methods and properties so that you can influence debugging behavior to help your testing efforts. Additionally, for C# and Managed Extensions for C++ applications, you can add your custom types to the autoexpand rules to make debugging even faster.

Finally, although you might never program in MSIL, it's simple to learn and can help you truly see what the .NET Framework class library is doing behind the scenes. If you'd like more information about MSIL, make sure to check out Partition III CIL.DOC, which you can find in <Visual Studio .NET installation directory>\SDK\v1.1\Tools Developers Guide\docs. In that information, you'll find the lowdown on every instruction and what each does.




Debugging Applications for Microsoft. NET and Microsoft Windows
Debugging Applications for MicrosoftВ® .NET and Microsoft WindowsВ® (Pro-Developer)
ISBN: 0735615365
EAN: 2147483647
Year: 2003
Pages: 177
Authors: John Robbins

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