Setting Custom Breakpoint Actions
Related Topics:
The action CUSTOM allows you to automatically execute one or more debugging commands each time your program reaches a specified event. This functionality is equivalent to the when command in dbx.
Use a Korn-shell script to include the debugging commands you want to execute. If you want program execution to stop, enter stop as the last command.
Syntax rules
- End each line but the last with a semicolon (;).
- Don't include the {}.
To create a breakpoint with a custom action:
- 1. In the Debugging Window, choose Windows
Breakpoints or Execute
Set Breakpoints.
- 2. If the Details pane of the Breakpoints window is not displayed, click the Add/Change Breakpoint button (the Add/Change Breakpoint button toggles to Hide Details).
- 3. From the Event list box, select the event that you want to cause the commands to execute.
- 4. In the Event text box, type any needed event information.
- 5. Choose Action
CUSTOM and enter a Korn-shell script that includes the debugging commands you want to execute.
- 6. Click Add.