In This Book

From the Breakpoint Set/Change dialog box, you can:

1.Select the type of breakpoint.

The area directly under the Select Breakpoint Type radio buttons changes to re￿ect the information needed by the breakpoint type. Enter the appropriate information for the selected breakpoint type.

2.Control whether or not messages appear when a breakpoint is hit.

3.Temporarily disable or re-activate breakpoints.

4.Stop execution only after the breakpoint has been reached a speci￿ed number of times.

5. Set location mapping for the breakpoint when debugging optimized code.

6.Specify debugger commands to execute when a breakpoint is hit.

7.Set breakp oints on speci￿ed threads when debugging a multi-threaded application.

To see a listing of breakpoints, select Break:Show .

Setting Watchpoints

Use watchpoints to monitor the value of a variable or memory range. (See \Examining Registers" in Chapter 4 for information on monitoring registers.) Values are displayed in the Data Watchpoint dialog box as well as in the debugger output area.

When you create a watchpoint, you specify the expression or address range to monitor, and a granularity. The granularity speci￿es how often the value should be reported: on procedure en try, on procedure exit, on procedure en try and exit, at every statement, at every machine instruction, or whenev er the program stops and returns con trol to the debugger.

The default gran ularity is to stop and report v alue changes only when the target program itself stops and returns con trol to the debugger. If y ou needed to monitor a variable more closely , you could specify a instruction- or statemen t-level granularity. At instruction-level gran ularity, for example,

3-8 Using Monitors (Breakpoints, Watchpoints, Traces, and Intercepts)