Progress
Language Reference
DEBUGGER System Handle
A handle that lets 4GL procedures initialize and control the Progress Application Debugger.
NOTE: To use the DEBUGGER handle, you must have the Progress Application Debugger installed in your Progress environment.SYNTAX
attribute
Specifies an attribute of the DEBUGGER handle.
method
Specifies a method of the DEBUGGER handle.
Method Return Type Description LOGICAL Removes a breakpoint in the current or specified procedure. LOGICAL Removes all breakpoints, cancels logging, and clears the Debugger window. LOGICAL Initializes and immediately gives control to the Debugger. LOGICAL Displays a character expression in the data panel. LOGICAL Initializes the Debugger, but does not immediately give control to it. LOGICAL Sets a breakpoint in the current or specified procedure. SET-BLUE-VALUE( ) Method
( n, int-val ) LOGICAL Sets the blue value of the nth entry. GET-BLUE-VALUE( ) Method ( n ) INTEGER Returns the blue value of the nth entry.EXAMPLE
The following example displays orders for each customer in the sports database using two procedure files. The
r-cusbug.p
file initializes the Debugger and sets a breakpoint at line 6 of ther-ordbug.p
file. Thus, each timer-ordbug.p
displays an order, the Debugger takes control before it displays the order lines. Just before completing execution,r-cusbug.p
clears the debugging session before returning.
NOTES
- The Debugger must be initialized before you can access any Debugger attribute or invoke any Debugger method other than the INITIATE or DEBUG methods.
- The TYPE attribute returns the widget type, PSEUDO-WIDGET.
- The VISIBLE attribute specifies whether the Debugger window is visible on the display. When set to FALSE, if the Debugger window is currently visible, it is removed from the display. When set to TRUE, if the Debugger window is currently invisible, it is displayed. Note that making the Debugger window visible does not, in itself, give control to the Debugger.
- After invoking the INITIATE method, execution continues in the procedure until it encounters a breakpoint or a statement invoking the DEBUG method. If the procedure encounters a breakpoint, the Debugger takes control running in application mode (with control over the invoking application). If the procedure invokes the DEBUG method, the Debugger takes control running in stand-alone mode (with control only over applications started from the Debugger).
- The DEBUG method and the INITIATE method provide separate means to invoke the Debugger, and do not depend on each other to start a debugging session. The DEBUG method initializes and gives control to the Debugger whether or not the INITIATE method has been executed.
- References to line numbers in internal procedures must be relative to the debug listing in which they are contained.
- When you set or cancel a breakpoint, you must distinguish between a line number value less than 1 and a value of 1 or greater. Any value for line-number less than 1 (for example, 0 or -1) specifies the first executable line of the main procedure in the file specified by procedure. However, a positive value for line-number specifies the first executable line on or after line-number in the file specified by procedure. For example, suppose procedure specifies a file 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 procedure specifies this file.
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.- For more information on the Debugger, its modes of execution, and commands, see the Progress Debugger Guide.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |