Datasheet

Figure 1-25: The Watch window lets you easily track expression values.
Toggle Breakpoint This command toggles whether the current code line contains a breakpoint.
When execution reaches a line with an active breakpoint, execution pauses so you can examine
the code and program variables. You can also toggle a line’s breakpoint by clicking on the mar-
gin to the left of the line in the code editor. In Figure 1-21, line number 4 displays a circle con-
taining an arrow on the left, indicating that it has a breakpoint (the circle) and that it is the
current line of execution (the arrow). The following line also contains a breakpoint, and line 7
contains a disabled breakpoint, indicated by a hollow circle in the left margin.
New Breakpoint This submenu contains the Break At Function command. This command dis-
plays a dialog that lets you specify a function where the program should break.
Delete All Breakpoints This command removes all breakpoints from the entire solution.
Enable All Breakpoints This command reenables any disabled breakpoints. The Enable All
Breakpoints command is available if any breakpoints are currently disabled. Note that you can
right-click a line of code that contains a disabled breakpoint and select Enable Breakpoint to
enable only that breakpoint.
Disable All Breakpoints This command temporarily disables all the solution’s breakpoints. The
breakpoints are still defined but they don’t interrupt the program’s execution. The Disable All
Breakpoints command is available if any breakpoints are currently enabled. Note that you can
right-click a line of code that contains a breakpoint and select Disable Breakpoint to disable only
that breakpoint.
The Debug\Windows Submenu
The Debug menu’s Windows submenu, shown in Figure 1-26, contains commands that display debugging-
related windows. The following list briefly describes these commands. The two sections that follow
describe some of the more complicated windows in greater detail.
Breakpoints This command displays the Breakpoints window shown in Figure 1-27. This dia-
log shows the breakpoints, their locations, and their conditions. Check or uncheck the boxes on
the left to enable or disable breakpoints. Right-click a breakpoint to edit its location, condition,
hit count, and action. Use the dialog’s toolbar to create a new function breakpoint, delete a
breakpoint, delete all breakpoints, enable or disable all breakpoints, go to a breakpoint’s source
code, and change the columns displayed by the dialog. Right-click on a breakpoint to change its
condition (a condition that determines whether the breakpoint is activated), hit count (a count
that determines whether the breakpoint is activated), and “When Hit” (action to take when acti-
vated). See the section “The Breakpoints Window” later in this chapter for more detail.
26
Chapter 1
571982 ch01_2.qxd 1/19/06 1:15 PM Page 26