Progress
Debugger Guide


Examining and Navigating in the Debugger Context

You can use the SHOW STACK, UP, and DOWN commands to examine and move around in the Debugger context, which includes the procedure stack accessible to the Debugger plus the executing procedure. These capabilities allow you to review your whole execution environment from the startup to the current executing procedure. By moving from one active procedure to another, you also focus on a new current procedure in the Debugger context. This allows you to examine and modify data that is accessible to that procedure. For more information on procedures and the Debugger context, see Introduction."

NOTE: An instance of a persistent procedure can be active in the Debugger context (and therefore made current) only when your application executes the main-line code, triggers, or internal procedures of the persistent procedure.

Examining the Procedure Call Stack

The SHOW STACK command displays a trace of the procedure call stack and executing procedure in the Debugger context. The procedure call stack contains a record of each procedure (stack entry) above the executing procedure that is waiting for a called procedure to return. The SHOW STACK command displays one line per stack entry, starting with the initial application procedure running in the session. Each line lists a procedure name and line number where the named procedure is waiting for the next procedure down to return. A context arrow points to the current procedure in the Debugger context. The default current procedure is the executing procedure (not on the stack) at the bottom of the list. If the executing procedure is the only procedure in the Debugger context, it is listed by itself.

NOTE: If the Debugger is running a procedure, and, at an interruption point, you execute another procedure with the RUN command, the current procedure is pushed on the call stack, and the newly executed procedure becomes the current procedure. This is true whether you run an inactive procedure or an active procedure recursively. The SHOW STACK command lists any such procedure “call” invoked from the Debugger as if it were invoked using the 4GL RUN statement from the procedure immediately above it. However, an additional message indicates that the procedure was started from the Debugger. For more information on running procedures from the Debugger, see the "Controlling Procedure Execution" section.

Navigating the Procedure Call Stack

You can enter the UP and DOWN commands to move up and down (change focus) in the Debugger context. Each focus change moves the context arrow up or down to the next procedure, which becomes the current procedure. Each time you change the current procedure, the Debugger displays the listing for the new current procedure. The listing indicates the breakpoints set for the current procedure, with the line pointer on the line where it is stopped. For a procedure on the call stack, this is the line where it is waiting for the next procedure down in the Debugger context to return. For the executing procedure, it is the current interruption point (the next line to execute).

Changing the current procedure with the UP and DOWN commands allows you to examine and modify data accessible to the new current procedure. Thus, the LIST and DISPLAY commands now reference data objects in the current procedure, whether or not it is the executing procedure.

However, the UP and DOWN commands do not change the course of procedure execution. (In other words, the execution status does not change.) Any Debugger control flow command you enter (for example, CONTINUE or NEXT) continues running the executing procedure from its current stopping point.

NOTE: If the procedure with prior focus was on the call stack (with its listing displayed), the debug listing for the currently executing procedure is not displayed unless you interrupt it with a breakpoint or break interrupt.


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