Datasheet

of Figure 1-32, the window shows each module’s load order (lower-numbered modules are
loaded first), the module’s version, timestamp, and the process using the module. Click on a col-
umn to sort the modules by that column.
Figure 1-32: The Modules window displays information about the modules used by the program.
Processes This window lists processes that are attached to the Visual Studio session. This
includes any programs launched by Visual Studio and processes that you attached to using the
Debug menu’s Attach to Process command.
The Breakpoints Window
A breakpoint is a line of code that you have flagged to stop execution. When the program reaches that
line, execution stops and Visual Studio displays the code in a code editor window. This lets you examine
or set variables, see which routine called the one containing the code, and otherwise try to figure out
what the code is doing.
The Breakpoints window lists all the breakpoints you have defined for the program. This is useful for
a couple of reasons. First, if you define a lot of breakpoints, it can be hard to find them all later. While
other commands let you disable, enable, or remove all of the breakpoints at once, there are times when
you may need to find a particular breakpoint.
A common debugging strategy is to comment out broken code, add new code, and set a breakpoint near
the modification so that you can see how the new code works. When you have finished testing the code,
you probably want to remove either the old or new code, so you don’t want to blindly remove all of the
program’s breakpoints. The Breakpoints window lists all of the breakpoints and, if you double-click a
breakpoint in the list, you can easily jump to the code that holds it.
The Breakpoints window also lets you modify the breakpoints you have defined. Check or uncheck the
boxes on the left to enable or disable breakpoints. Use the dialog’s toolbar to enable or disable all break-
points, clear all breakpoints, or jump to a breakpoint’s source code.
Right-click a breakpoint and select Condition to display the dialog shown in Figure 1-33. By default, a
breakpoint stops execution whenever it is reached. You can use this dialog to add an additional condi-
tion that determines whether the breakpoint activates when reached. In this example, the breakpoint
30
Chapter 1
571982 ch01_2.qxd 1/19/06 1:15 PM Page 30