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 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.

To open the Breakpoint Options dialog box, do one of the following,

This dialog box contains two pages:

The Breakpoint Type option applies to either page of the dialog.

Breakpoint Type

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.

Dialog box options

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. The possible actions are:

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