Progress
Debugger Guide


Application Mode

The Debugger runs in application mode when you start an initial application using the Debugger options of the Procedure Editor and the AppBuilder. This application runs in the Debugger context, and the Debugger takes control when the application stops at an automatic breakpoint set at the first executable line. This gives you a chance to examine your application listings and set breakpoints before continuing execution. You can also run any other procedures from the Debugger using the RUN command, effectively running them under your initial application. Figure 3–1 shows the relationship between the Debugger in application mode, its initial application, other procedures it might run, and the Progress environment in which it is running.

Figure 3–1: Debugging in Application Mode

In application mode, you can start and restart the Debugger and its initial application without leaving your Progress environment, but how the Debugger restarts depends on how you exit.

Exiting Procedures Started with the RUN Command

When you exit a procedure started with the RUN command, it returns control to the Debugger. Any previous application on the stack (including the initial application) waits to resume execution at its current stopping point.

Exiting the Debugger Before the Initial Application

When you exit the Debugger in application mode (using the EXIT command), the Debugger purges itself from the Progress environment and closes any applications started with the RUN command. It then returns control to the initial application, which continues execution from its current interruption point. If you restart (cold-start) the Debugger in application mode from the same startup environment, the Debugger completely re-initializes itself.

Exiting the Initial Application Before the Debugger

When you exit the initial application, it returns control to the environment where you started it. If the Debugger is running when you exit, the Debugger clears and closes its window, removes all breakpoints, and closes any open log file, but leaves Debugger session settings such as window size, macro, and button definitions initialized in the Progress environment. If you then run the same or another initial application using the Editor or AppBuilder Debugger option, the Debugger restarts (warm-starts) and takes control with a breakpoint at the first executable line. The Debugger window opens with its previous window dimension and button settings, but it does not re-initialize itself (that is, does not reread its initialization files). If you want to run any other Debugger commands or set any breakpoints expected during initialization, you must execute them again in the Debugger after it restarts. (You can also Use command files. For more information, see Running a Debugging Session.")

NOTE: You can also run the Debugger in application mode from your own application using the DEBUGGER system handle. This approach offers more flexibility between the Debugger and your application. For more information, see DEBUGGER and SESSION System Handles."


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