DEBUGGER system handle

A handle that lets ABL procedures initialize and control the Application Debugger.

To use the DEBUGGER handle, you must have the Application Debugger installed in your OpenEdge environment.

Note: Does not apply to SpeedScript programming.

Syntax

DEBUGGER [ :attribute | :method]
attribute
Specifies an attribute of the DEBUGGER handle.
method
Specifies a method of the DEBUGGER handle.

Attributes

Methods

Example

The following example displays Orders for each Customer in the Sports2000 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 NO-UNDO.

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

FOR EACH CustBuf NO-LOCK:
  IF CAN-FIND(Order OF CustBuf) THEN
    RUN r-ordbug.p.
END.

debug = DEBUGGER:CLEAR().

r-ordbug.p

DEFINE SHARED BUFFER CustBuf FOR Customer.

FOR EACH Order OF CustBuf NO-LOCK:
  DISPLAY CustBuf.Name CustBuf.CustNum CustBuf.City CustBuf.State
    CustBuf.PostalCode Order.OrderNum.
  FOR EACH OrderLine OF Order NO-LOCK, Item OF OrderLine NO-LOCK:
    DISPLAY Item.ItemName Item.ItemLum LrderLine.Qty.
  END. /* FOR EACH OrderLine */
END. /* FOR EACH Order */

Notes

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.

For more information on the Debugger, its features and functions, and its modes of execution, see OpenEdge Development: Debugging and Troubleshooting.

See also

LOG-MANAGER system handle