Breakpoint Options dialog box
Use the Breakpoint Options dialog box to specify where and when you want a breakpoint to occur, and what type of breakpoint you want it to be.
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 Source File and Line Number. |
When a condition you specify occurs as a line of code is executed. |
Choose Source Breakpoint and enter a value for Source File, Line Number, and Condition. |
When a line has been passed through a certain number of times. |
Choose Source Breakpoint and enter a value for Source File, Line Number, and Pass Count. |
When condition has been passed through a certain number of times. |
Choose Source Breakpoint and enter a value for Source File, Line Number, Condition, and Pass Count. |
When an exception occurs. |
Choose Exception Breakpoint and enter the Exception Breakpoint Type and Condition. |
|
To open the Breakpoint Options dialog box, do one of the following,
- Choose Run|Add Breakpoint.
- Select a breakpoint in the Breakpoint List window, right-click, and choose Options.
This dialog box contains two pages:
The Breakpoint Type, at the top of the dialog, applies to both pages.
See also:
Building Applications with JBuilder: Using breakpoints
Breakpoint Type
The Breakpoint Type option, at the top of the dialog, applies to both pages. This option chooses the type of breakpoint to create, or the type of the selected breakpoint.
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.
Breakpoint Definition page
The Breakpoint Definition page defines the breakpoint.
Source File
Sets or changes the source file for the breakpoint. Enter the name of the source file for the breakpoint. This option is only displayed when Source Breakpoint is selected.
Line Number
Sets or changes the line number for the breakpoint. Enter or change the line number for the breakpoint. This option is only displayed when Source Breakpoint is selected.
Exception Breakpoint Type
Chooses the type of breakpoint. These options are only displayed when Exception Breakpoint is selected.
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.
Condition
Specifies a conditional expression that is evaluated each time the breakpoint is encountered. Application execution stops when the expression evaluates to True. Enter a conditional expression to stop execution.
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.
Breakpoint Name
The breakpoint's unique name. If left blank, JBuilder will assign a default name to the breakpoint. The name appears in the Breakpoint List window.
Group Name
Assigns the breakpoint to a group. Either select an existing breakpoint group name, or type a new breakpoint group name. Associating several breakpoints with the same group name enables you to change the settings for several breakpoints with a single action.
Thread Options
Selects the thread to break on.
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.
Action page
Choose an option in this group to select the action that occurs when the breakpoint is reached. Options are available for both Source and Exception breakpoints.
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.
Expression
The selected breakpoint.
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.