Progress
Language Reference


DEBUGGER System Handle

Interfaces
OS
SpeedScript
All
All
No

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

DEBUGGER [ :attribute | :method ] 

attribute

Specifies an attribute of the DEBUGGER handle.

Attribute
Type
Readable
Setable
CHARACTER
LOGICAL

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.
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 the r-ordbug.p file. Thus, each time r-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.

r-cusbug.p
DEFINE NEW SHARED BUFFER CustBuf FOR customer.

DEFINE VARIABLE debug AS LOGICAL. 
debug = DEBUGGER:INITIATE().
debug = DEBUGGER:SET-BREAK("r-ordbug.p",6).

FOR EACH CustBuf:
    IF CAN-FIND(order OF CustBuf) THEN
        RUN r-ordbug.p.
END. /* FOR EACH CustBuf */

debug = DEBUGGER:CLEAR(). 

r-ordbug.p
DEFINE SHARED BUFFER CustBuf FOR customer.

FOR EACH order OF CustBuf:
    DISPLAY CustBuf.Name CustBuf.Cust-num CustBuf.City CustBuf.State 
            CustBuf.Postal-code order.Order-num.
    FOR EACH order-line OF order, item OF order-line:
        DISPLAY item.Item-name item.Item-num order-line.Qty.
    END. /* FOR EACH order-line */
END. /* FOR EACH order */ 

NOTES


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095