TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Breakpoints > New (Debugger)
Debug > Break (Debugger)

The Debug > Break and the Breakpoints > New commands create a new breakpoint using the Set Breakpoint dialog box. Breakpoints are discussed in detail in Using the Apex Debugger.

The new breakpoint is logged in the Debugger Log and appears in the Breakpoint window.

If you wish to set a conditional breakpoint, select the Conditional box. This will cause a new screen to appear. You can do this on the dialog box displayed above.

Note: It is also possible to set breakpoints by placing your cursor on the line in the source window on which the breakpoint is to be set and pressing b. A red stop sign will appear to left of the line number indicating a breakpoint exists on that line. Breakpoints can also be entered using the Command Line Pane at the bottom of the Debugger Window. Commands available through this interface include break on instruction (bi), break after current subprogram (bd), break at return (br), set watchpoint (bw), and break at exception (catch/propagate). These are discussed in detail in Using the Apex Debugger.

Set Breakpoint Dialog Box Fields:

Breakpoint Type/Location

The Location field is at the top of the Set Breakpoint screen. Selecting this field displays three options: On Line, On Location, and On Instruction.

File Name

If On Line is selected, you must enter a debugger pathname denoting a program unit in this field.

Task Name

If there is tasking in your program, this line enables you to set task level breakpoints. When the dialog box is invoked, the name of the current task is listed in this area. By default, the breakpoint is only set in the current task. To set the breakpoint in a different task, enter the task number of the desired task. A list of tasks and their associated task numbers can be displayed by selecting the Windows > Tasks command. To set a breakpoint in all tasks, enter 0 in this area.

Statements

In this area, enter a sequence of one or more commands that automatically execute when the breakpoint is reached. You can enter the commands on the same line separated by semicolons or enter each command on its own line. The second method (separate lines) is recommended. Note that you do not need to enter the starting begin command or the final end command.

Conditional

Conditional breakpoints are those breakpoints which allow alternate execution paths based on the result of a specified expression. The user can enter a series of statements/commands to be executed depending on the boolean value of the specified conditional expression. If no statements are entered for a given condition result (True or False), execution continues transparently to the user if the expression evaluates to that condition.

To set a conditional breakpoint, select the Conditional button. A new dialog box will appear.

The following can be defined through this dialog box.

Location of Breakpoint

File Name

If On Line is selected, you must enter a debugger pathname denoting a program unit in this field.

Condition

The condition is an expression that is evaluated each time the breakpoint is reached. This evaluation takes place in the environment of the location of the breakpoint.

On this line, enter the expression to be evaluated when this breakpoint is hit. The expression is evaluated and, 0 means False and all other values mean True. All comparison operators (<, <=, =, etc.) return 0 for False and 1 for True.

The debugger verifies that the conditional expression is valid when the breakpoint is set. The expression is verified using the visibility rules, etc., that exist when the breakpoint is hit and the conditional statements are evaluated.

Statements if Condition True

In this area, enter a sequence of one or more statements that automatically execute if the conditional expression evaluates to True. You can enter the statements on the same line separated by semicolons or enter each statement on its own line. The second method (separate lines) is recommended. Note that you do not need to enter the starting begin command or the final end

Statements if Condition False

In this area, enter a sequence of one or more statements that automatically execute if the conditional expression evaluates to False. You can enter the statements on the same line separated by semicolons or enter each statement on its own line. The second method (separate lines) is recommended. Note that you do not need to enter the starting begin command or the final end

Additional Topics

To see related information, click on a topic:


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS