Chapter 5: Advanced Debugger Usage with Visual Studio .NET


Overview

No matter how much great diagnostics code you use and how much planning you do, occasionally you need to run the debugger. As I've mentioned multiple times in this book, the whole key to debugging effectively is to avoid the debugger as much as possible because that's where you waste all your time. Now I know that most of you will be in the debugger to fix your coworkers' code, not your own (since the code you write is undoubtedly perfect). I want to make sure that when you must resort to the debugger, you're able to get the most out of it and fix problems as quickly as possible. This means you'll want to be able to get the most out of the debugger so that you can find and fix problems as fast as possible. In this chapter, I'll talk about how to take advantage of the wonderful Microsoft Visual Studio .NET debugger. If you've been developing for Microsoft platforms for a long time like I have, you can certainly see a marked progression of debugger improvements over the years. In my opinion, Visual Studio .NET is a huge jump in progress and is the state-of-the-art debugging tool. The team has done an outstanding job of combining an extremely easy-to-use user interface (UI) with power to spare for the really hard problems. The fact that Windows developers now have one debugger that handles script, Microsoft Active Server Pages (ASP), Microsoft ASP.NET, .NET, XML Web Services, native code, and SQL debugging in a single debugger UI is amazing.

This is the first of three chapters on the Visual Studio .NET debugger. In this chapter, I'll cover the common advanced ground of .NET and native debugging because so much is similar between the two environments. These features, which include advanced breakpoints, will assist you in solving your coding problems. I'll also provide a slew of tips to help you make the most out of the time you spend in the debugger. In Chapter 6, I'll cover specific issues related to .NET development. In Chapter 7, I'll discuss issues more specific to native code debugging. No matter what type of code you're debugging, you'll find many relevant tips in this chapter.

If you're new to the Visual Studio .NET debugger, I suggest that you read the documentation before continuing. I won't be covering the basics of the debugger in this chapter; I'll assume that you'll study the documentation if you need to. The debugger is discussed in the Visual Studio .NET documentation under Visual Studio .NET\Developing with Visual Studio .NET\Building, Debugging, and Testing or in the MSDN Online documentation under .NET Development\Visual Studio .NET\Product Documentation\Developing with Visual Studio .NET\Building, Debugging, and Testing (http://msdn.microsoft.com/library/en-us/vsintro7/html/vxoriBuildingDebuggingandTesting.asp).

Before you read any further, take note: if you haven't read about your symbol server and set it up as discussed in Chapter 2, you're missing one of the best capabilities of Visual Studio .NET. No matter whether you're developing .NET or native applications, getting perfect symbols automatically loaded means you'll always have a leg up solving your debugging problems.




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