Using SoftBench Debugger

Setting and Using Breakpoints

the Source File Area, you can simply click on the breakpoint symbol to clear it. If the breakpoint is not currently visible:

1.Choose "Break: Show" to display all current breakpoints.

2.Click on the breakpoint you want to clear. You can double-click on a breakpoint to display its source in the Source File Area, so you can be sure you delete the correct breakpoint.

3.Select Delete to remove the breakpoint.

The breakpoint description disappears, indicating that the breakpoint has been cleared.

You can clear all breakpoints by choosing "Break: Clear All".

You can also "deactivate" (Suspend) breakpoints without permanently deleting them. See “Viewing and Modifying Breakpoints” on page 193.

Executing DDE Commands at a Breakpoint

You can have SoftBench Debugger execute a debugger command whenever it stops at a breakpoint. When you create or modify a breakpoint using the "Breakpoint Set/Change" dialog box:

1.Enter the desired debugger command in the "Commands" input box. See "Help: DDE Reference" for more information on these commands.

2.Enter a number in the "Stop After Count" input box to specify the number of times you want your program to ignore the breakpoint before it stops and executes the commands. The "Hits" field tells how many times the breakpoint has already been encountered. "Count" defaults to 0, meaning SoftBench Debugger stops on the first encounter.

3.Select OK. If you select Cancel, SoftBench Debugger discards the command entered in the input box, and does not modify the breakpoint.

For example, if you are sure an error happens on the 53rd time through a loop, you could set a breakpoint in the loop and enter 52 in the "Stop After Count" input box.

If the error happens only when the variable x is 14, you could enter

"print x; if x != 14 -then [go]" in the "Commands" input box. This prints the value of x each time SoftBench Debugger encounters the

Chapter 7

195

Page 195
Image 195
HP UX SoftBench Software manual Executing DDE Commands at a Breakpoint