IDLWAVE helps you set breakpoints and step through code. Setting a
breakpoint in the current line of the source buffer is accomplished
with C-c C-d C-b (
idlwave-shell-break-here). With a
prefix arg of 1 (i.e., C-1 C-c C-d C-b), the breakpoint gets a
/ONCE keyword, meaning that it will be deleted after first use.
With a numeric prefix greater than one (e.g., C-4 C-c C-d C-b),
the breakpoint will only be active the
nth time it is hit.
With a single non-numeric prefix (i.e., C-u C-c C-d C-b), prompt
for a condition: an IDL expression to be evaluated and trigger the
breakpoint only if true. To clear the breakpoint in the current line,
use C-c C-d C-d (
executed from the shell window, the breakpoint where IDL is currently
stopped will be deleted. To clear all breakpoints, use C-c C-d
idlwave-clear-all-bp). Breakpoints can also be disabled
and re-enabled: C-c C-d C-\
Breakpoint lines are highlighted or indicated with an icon in the source code (different icons for conditional, after, and other break types). Disabled breakpoints are grayed out by default. Note that IDL places breakpoints as close as possible on or after the line you specify. IDLWAVE queries the shell for the actual breakpoint location which was set, so the exact line you specify may not be marked. You can re-sync the breakpoint list and update the display at any time (e.g., if you add or remove some on the command line) using C-c C-d C-l.
In recent IDLWAVE versions, the breakpoint line is highlighted when the mouse is moved over it, and a tooltip pops up describing the break details. mouse-3 on the breakpoint line pops up a menu of breakpoint actions, including clearing, disabling, and adding or changing break conditions or “after” break count.
Once the program has stopped somewhere, you can step through it. The most important stepping commands are C-c C-d C-s to execute one line of IDL code ("step into"); C-c C-d C-n to step a single line, treating procedure and function calls as a single step ("step over"); C-c C-d C-h to continue execution to the line at the cursor and C-c C-d C-r to continue execution. See Commands Sent to the Shell, for information on displaying or hiding the breakpoint and stepping commands the shell receives. Here is a summary of the breakpoint and stepping commands:
|C-c C-d C-b||Set breakpoint (|
|C-c C-d C-i||Set breakpoint in module named here (|
|C-c C-d C-d||Clear current breakpoint (|
|C-c C-d C-a||Clear all breakpoints (|
|C-c C-d [||Go to the previous breakpoint (|
|C-c C-d ]||Go to the next breakpoint (|
|C-c C-d C-\||Disable/Enable current breakpoint (|
|C-c C-d C-j||Set a breakpoint at the beginning of the enclosing routine.
|C-c C-d C-s||Step, into function calls (|
|C-c C-d C-n||Step, over function calls (|
|C-c C-d C-k||Skip one statement (|
|C-c C-d C-u||Continue to end of block (|
|C-c C-d C-m||Continue to end of function (|
|C-c C-d C-o||Continue past end of function (|
|C-c C-d C-h||Continue to line at cursor position (|
|C-c C-d C-r||Continue execution to next breakpoint, if any (|
|C-c C-d C-up||Show higher level in calling stack (|
|C-c C-d C-down||Show lower level in calling stack (|
All of these commands have equivalents in Electric Debug Mode, which provides faster single-key access (see Electric Debug Mode).
The line where IDL is currently stopped, at breakpoints, halts, and
errors, etc., is marked with a color overlay or arrow, depending on the
idlwave-shell-mark-stop-line. If an overlay face is
used to mark the stop line (as it is by default), when stepping through
code, the face color is temporarily changed to gray, until IDL completes
the next command and moves to the new line.
nilmeans mark breakpoints in the source file buffers. The value indicates the preferred method. Valid values are
The face for breakpoint lines in the source code if
idlwave-shell-mark-breakpointshas the value
Whether to pop-up a menu and present a tooltip description on breakpoint lines.
nilmeans mark the source code line where IDL is currently stopped. The value specifies the preferred method. Valid values are
The overlay arrow to display at source lines where execution halts, if configured in