Debug View

The Debug view provides a graphical representation of the call stack of your program and the place where the IDL interpreter has stopped, either due to an error in the code or a breakpoint you inserted. At the bottom of the call stack is IDL's $MAIN$ context. A program called from $MAIN$ sits "on top" of $MAIN$ in the call stack; similarly, programs called from other programs sit "above" in the stack. For example, the following image of the Debug view depicts execution stopped in a routine called IDLNETURL_WIDGET, which was called from the IDL command line ($MAIN$).

debug_view_window.gif

The Debug view works in concert with other views to provide diagnostic information about your program. For example, variables for the current program scope are displayed in the Variables view, and breakpoints are listed in the Breakpoints view. The source editor indicates the current line being executed, and displays breakpoints in the left margin.

By default, the Debug view is only included in the Debug perspective. To add the Debug view to the IDL perspective:

  1. Select Window  Show View  Other.
  2. The Show View dialog displays.

  3. Select Debug  Debug.

Toolbar

The toolbar of the Debug view contains the following buttons:

debug_view_buttons.jpg

Toolbar Button
Description

Resume

Resumes program execution.

Suspend

Temporarily halts program execution.

Terminate

Primarily stops program execution, but this option also issues the following commands:

RETALL

WIDGET_CONTROL, /RESET

CLOSE, /FORCE, /ALL

HEAP_GC, /VERBOSE

Step Into

Executes the current statement.

If the current statement calls another routine written in IDL code, execution steps "into" the called routine and stops.

Step Over

Executes the current statement.

If the current line includes a call to another routine, executes the entire routine, but does not step into the routine code.

Step Return

Finishes executing the current routine and jumps back to the calling routine.

Skip Next Statement

Skips the current line of code (does not execute it).

Menu

Displays a dialog that allows you to choose perspectives in which the Debug view is allowed to automatically open and close views.

Minimize

Minimizes the view in the perspective.

Maximize

Maximizes the view in the perspective.

Note
The execution commands (Resume, Terminate, and so on) are also located on the main menu's Run menu.