Setting breakpoints in the Breakpoint Options dialog box
|
|
Type of Breakpoint | How to Create |
|
|
When a line of code you specify is executed. | Choose Source Breakpoint and enter a value for Filename and Line Number. |
When a condition you specify occurs as a line of code is executed. | Choose Source Breakpoint and enter a value for Filename, Line Number, and Condition. |
When a line or condition has been passed through a certain number of times. | To create a breakpoint based on the number of times a line is executed, choose Source Breakpoint and enter a value for Filename, Line Number, and Pass Count. To create a breakpoint based on the number of times a condition occurs as a line of code executes, enter a value for Filename, Line Number, Condition, and Pass Count. |
When an exception occurs. | Choose Exception Breakpoint and enter the Exception Type and Condition. |
|
This dialog box contains two pages:
The Breakpoint Type option applies to either page of the dialog.
Source Breakpoint
Creates a breakpoint that will pause at the selected point in the source.
Exception Breakpoint
Creates a breakpoint that will pause at an exception.
Unhandled Exception Throw
Break on an unhandled exception throw.
All Handled Exception Throws
Break on all handled exception throws.
Handled Throw Of Class
Break on the selected handled exception throw.
You can enter any valid language expression. However, all symbols in the expression must be accessible from the breakpoint's location, and the expression cannot contain method calls.
Break For All Threads
Break on all threads.
Break Only For Thread ID:
Break on the selected thread.
Pass Count
Stops application execution at the current breakpoint after passing through the breakpoint the specified number of times. JBuilder decrements the pass count number each time the line containing the breakpoint is encountered. When the pass count equals 1, JBuilder pauses program execution.
Because JBuilder decrements pass counts with each pass, you can use them to determine which iteration of a loop fails. Set the pass count to the maximum loop count and run your program. When the application fails, you can calculate the number of loop iterations by examining the pass count number.
When you use pass counts with conditions, execution pauses the nth time that the conditional expression is true. JBuilder decrements the pass count only when the conditional expression is true.
Halt Execution
Stops execution when the breakpoint is reached.
Dialog on Breakpoint Occurrence
Displays a confirmation dialog that identifies the breakpoint and the breakpoint type. Click OK to close the dialog.
Log Breakpoint Occurrence
Add each occurrence of the selected breakpoint to the Debugger log.
Enable Another Breakpoint
Enables the selected breakpoint.
Disable Another breakpoint
Disables the selected breakpoint.
Enable a Group of Breakpoints
Enables the selected breakpoint group.
Disable a Group of Breakpoints
Disables the selected breakpoint group.
See also:
User's Guide: Using breakpoints