Progress
Debugger Guide


Application Control

During a debugging session, the Debugger allows you to start and stop procedure execution as you want, and even execute procedures that are not currently part of your application. All procedures that the Debugger executes are added to the procedure call stack. The procedure call stack is a last-in-first-out (LIFO) memory structure that keeps track of the execution status of each procedure as it calls a subprocedure or invokes a trigger block.

Open and Incremental Execution

If you want to execute a procedure other than the one the Debugger is currently running, you can start it from the Debugger using the RUN command. Whenever the Debugger has control, you can run any application, effectively adding it to the procedure call stack of your current application. This allows you to mix and match procedures dynamically, or to run diagnostic procedures while debugging your application. (Note that you cannot start a procedure that requires parameters or arguments from the Debugger. The Debugger has no way to define them.)

When the Debugger is stopped in an executing procedure, you can continue execution using the CONTINUE command. This allows the procedure to execute until it terminates or reaches the next stopping point.

You can also continue executing the current procedure incrementally using the NEXT and STEP commands. Each incremental execution runs one or more sequential lines of code and returns to the Debugger for your next command.

Procedure Interruption

To selectively interrupt procedure execution, you can set or remove breakpoints using the BREAK and CANCEL BREAK commands. A breakpoint is a specific line in a procedure where you want execution to stop temporarily. When the procedure reaches a breakpoint, it halts before executing the specified line and gives control to the Debugger for your next command.

You can also set and remove breakpoints from the 4GL using the DEBUGGER handle SET-BREAK( ) and CANCEL-BREAK( ) methods. This feature is helpful in a large application when you want to trace complex logic or trigger operation without reference to specific line numbers, or for setting breakpoints in include files that might appear in many different procedures.

To interrupt a running procedure and give immediate control to the Debugger, the Debugger provides a break interrupt function. This is a special function that bypasses standard Debugger command input to interrupt the procedure wherever it is executing, as if it encountered a breakpoint. It is particularly useful when you want to interrupt a procedure in which you have not set a breakpoint.

Procedure Termination

You can force an interrupted procedure to terminate using the STOP and QUIT commands. These commands effectively insert and execute a corresponding Progress STOP or QUIT statement at the current stopping point.


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