SET-BREAK( ) method
Sets a breakpoint for a debugging session.
Return type: LOGICAL
Applies to: DEBUGGER system handle
procedure
A character expression that specifies the name of the procedure in which you want to set the breakpoint. The specified procedure does not have to exist at the time the breakpoint is set. If you do not specifyprocedure
, the method sets the breakpoint at the next executable line of the current procedure.line-number
An integer expression that specifies the line number inprocedure
(based at line 1 of the debug listing) where you want to set the breakpoint. A positive integer greater than or equal to 1 represents a line number in the specifiedprocedure
file. Zero (0) or a negative integer value represents the first executable line of the main procedure block in the specifiedprocedure
file. If you do not specifyline-number
, the method sets the breakpoint at the first executable line ofprocedure
file. Ifline-number
is greater than the last executable line number, the method sets the breakpoint at the last executable line ofprocedure
. Ifline-number
does not specify an executable line, the method sets the breakpoint at the next executable line after the line specified byline-number
.If the Debugger is initialized, this method returns TRUE. Otherwise, it returns FALSE with no effect. For more information, see the reference entry for the DEBUGGER system handle.
Note: To use this method, you must have the Application Debugger installed in your OpenEdge environment.Note that the Debugger sets breakpoints on physical lines—not statements. If you invoke DEBUGGER:SET-BREAK( ) on a line that contains other executable statements, all the other statements on that line execute before the breakpoint occurs on the next executable line. This is true whether the statements appear on the same line before or after the invocation of the SET-BREAK( ) method.
If you invoke DEBUGGER:SET-BREAK (
procedure
,line-number
) on the same line that is specified byprocedure
andline-number
, the specified line executes the first time without breaking. The breakpoint occurs only on the second and succeeding executions of the line.Note: You cannot set a watchpoint programmatically using the DEBUGGER system handle. A watchpoint is a form of breakpoint which tells the Debugger to interrupt program execution when the value of a variable, buffer field, or attribute reference changes.
OpenEdge Release 10.2B
|