![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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.
- On Line
To set a breakpoint on a specific line in a file, select On Line then enter the line number. Then, In the File field, enter a debugger pathname denoting a program unit. If source code is being displayed in the Debugger Window, a red stop sign appears to the left of the line where the breakpoint was set.
- On Location
If you wish to set a breakpoint at a subprogram, task or package, enter the name of a subprogram, task, package, Diana postion, function or class. If the subprogram (Ada)/function (C/C++) name given is a simple identifier, all subprograms, tasks, packages (with an elaboration subprogram) , functions or classes in the program are visible.
The subprogram (Ada)/function (C/C++) can also be given as an expanded name . The leftmost simple name of an expanded name must be directly visible from the current context.
If On Location is selected, the File: input box disappears as it is no longer relevant.
- On Instruction
To set a breakpoint at an machine instruction, select On Instruction. Enter the address of the instruction (in hexadecimal) on which the breakpoint is to be set. Please note that "C" language hex notation must be used (i.e., "0x1214fc").
If On Instruction is selected, the File: input box disappears as it is no longer relevant.
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.
- On Line
To set a conditional breakpoint on a specific line in a file, select On Line then enter the line number. Then, in the File field, enter a debugger pathname denoting a program unit. If source code is being displayed in the Debugger Window, a stop sign appears to the left of the line where the breakpoint was set.
- On Location
If you wish to set a conditional breakpoint at a subprogram, task or package, enter the name of a subprogram, task, package, function or class. If the subprogram (Ada)/function (C/C++) name given is a simple identifier, all subprograms, tasks, packages (with an elaboration subprogram) , functions or classes in the program are visible.
The subprogram (Ada)/function (C/C++) can also be given as an expanded name . The leftmost simple name of an expanded name must be directly visible from the current context.
If On Location is selected, the File: input box disappears as it is no longer relevant.
- On Instruction
To set a breakpoint at an machine instruction, select On Instruction. Enter the address of the instruction (in hexadecimal) on which the breakpoint is to be set. To enter a breakpoint
If On Instruction is selected, the File: input box disappears as it is no longer relevant.
If On Line is selected, you must enter a debugger pathname denoting a program unit in this field.
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.
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
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
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |