Chapter 39. Using the Debugging Windows


  • Learning basic debugging concepts in Visual Studio, including breakpoints and DataTips

  • Understanding the debugging windows in Visual Studio

  • Using and unwinding exceptions during a debug session

Debugging an application is one of the more challenging tasks developers have to tackle, but correct use of the Visual Studio 2010 debugging windows will help you analyze the state of the application and determine the cause of any bugs. This chapter examines the numerous windows available in Visual Studio 2010 to support you in building and debugging applications.


The most important window for debugging purposes is the code window. With the capability to set breakpoints and step through code, this window is the starting point for almost all debugging activities. Figure 39-1 shows a simple snippet of code with both a breakpoint and the current execution point visible.

Figure 39-1

Figure 39-1. Figure 39-1


The first stage in debugging an application is usually to identify the area that is causing the error by setting a breakpoint and gradually stepping through the code. Setting breakpoints and working with the current execution point are covered in more detail in the next chapter. Although you can't see the color in Figure 39-1, breakpoints are marked in the code window with a red dot in the margin of the page and red highlighting ...

Get Professional Visual Studio® 2010 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.