Progress
ADM 2 Guide


The Progress Debugger

The Progress Debugger enables you to move automatically from object to super procedure, and from event publisher to subscriber. You can use this tool to follow the flow of control among the persistent procedures that make up an application.

Here is an effective way to begin a debugging session for a SmartObject application:

  1. Choose a starting point for a debugging session by picking the event procedure where you want to start tracking the program flow. You can find this procedure in the Procedure Object Viewer.
  2. Create a local version of that event procedure or function in the SmartObject where you want to begin tracing behavior.
  3. In that procedure or function, insert the following statements before the RUN SUPER statement:
  4. DEBUGGER:INITIATE( ). 
    DEBUGGER:SET-BREAK( ). 
    

  5. Save this object and run the SmartWindow that contains it. The Debugger starts up the first time that procedure or function executes.
  6. When the Debugger starts up, use the STEP command, which causes the Debugger to step into the super procedure version of that same procedure. This effectively puts a breakpoint at the start of an internal procedure or function in a super procedure without the necessity of editing the super procedure itself.

Alternatively, if you run your Progress session with the -debugalert startup option, you can simply code a message statement in Step 3, instead of explicitly invoking the Debugger; for example:

MESSAGE "proc-name". 

Then, when you run your application and the message alert box appears, press the HELP button to see a stack trace of the Progress 4GL code and determine where you are in the application. If you now press the Debug button on the stack trace window and the OK button on the original message alert box, Progress invokes the Debugger to allow you to move through the application from that point. (If you do not want to enter the Debugger, do not press the Debug button.)

Debugger Tips

Here are some useful notes for using the Debugger:


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