Progress
Debugger Guide
BREAK Command
Sets a breakpoint on an executable line in a procedure.
SYNTAX
PARAMETERS
proc-name
The name of a Progress procedure.
line-no
An integer that specifies a line number in the listed or specified procedure.
NOTES
- When you set a breakpoint, the Debugger echoes the setting in the data panel, including the ordinal breakpoint number, procedure name, and line number. If the procedure is displayed in the listing panel, the breakpoint indicator appears next to the corresponding line.
- If you do not specify a procedure name, the breakpoint is set on the specified line in the procedure displayed in the listing panel.
- If you specify only a procedure name, the breakpoint is set on the first executable line if the procedure is active in the Debugger context, and on just the procedure name if the procedure is inactive. When the inactive procedure becomes active, the breakpoint resolves to the first executable line.
- If you specify a line number for an active procedure in the Debugger context, the breakpoint is set on the first executable line on or after the specified line. If there is no executable line on or after the specified line, the breakpoint is set on the last executable line. For example, if you enter BREAK 10 for an active procedure displayed with the following lines, the breakpoint is actually set on line 12:
- If you specify a line number (line-no) for an inactive procedure, the breakpoint is set on the specified line. When the procedure becomes active in the Debugger context, the specified breakpoint adjusts to the corresponding effective breakpoint line.
- When setting a breakpoint, there is a special distinction between specifying a line number value less than 1 and specifying a value of 1 or greater. Any value for line-no less than 1 (for example, 0 or -1) specifies the first executable line of the main procedure in the procedure file. However, a positive value for line-no specifies the first executable line on or after line-no in the procedure file. For example, suppose the procedure file starts out like this:
If you specify a breakpoint at line 0, -1, or any negative value, the breakpoint actually occurs at line 6, the first line that executes in the main procedure. If you specify a breakpoint at line 1 or 2, the breakpoint occurs at line 3, the first executable line in the file, which happens to be the first executable line of an internal procedure.
This distinction also affects procedures containing the Trigger Phrase used to define triggers in widget definitions. For example, suppose the procedure file starts out like this:
Again, if you specify a breakpoint at line -1, the breakpoint occurs on line 6, but if you specify the breakpoint at line 1, it actually occurs at line 4, which is the first executable line of a trigger block.
NOTE: There is no distinction between line -1 and line 1 for an ON statement because the ON statement is itself an executable statement. Thus, the executable lines of its trigger block are not breakpoint candidates in this scenario.SEE ALSO
CANCEL ALL Command, CANCEL BREAK Command, SHOW BREAKS Command
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |