Breakpoints

A breakpoint is a marker in an IDL source code file that tells IDL to halt execution temporarily, allowing you to inspect the state of program variables in the program unit where the breakpoint occurred. Breakpoints allow you to control the flow of execution of your IDL program, stopping and starting at will.

You can set a breakpoint in a file in an open editor window by placing the cursor in the line where you want the breakpoint to appear and doing any of the following:

When you set a breakpoint, a blue dot is placed in the grey gutter at the left edge of the editor window.

Breakpoints-08.jpg

What Happens When IDL Encounters a Breakpoint

When IDL executes a routine for which you have set a breakpoint, execution halts. Depending on your preferences you either switch to the Debug perspective automatically or the Debug view will be displayed in your current perspective. (For more on this behavior, see Automatic Perspective Switching.) An editor window containing the code for the routine that was executing is displayed, and an arrow in the left-hand gutter indicates the line of code where execution stopped.

breakpoint_with_execution_pointer.gif

Breakpoint States

Breakpoints can be:

You can change between the Enable and Disabled states by selecting Toggle Breakpoint from the Run menu or double-clicking on the grey gutter at the left edge of the editor window.

Note
The IDL Workbench remembers breakpoints set in a file between IDL sessions. This means that you can close the workbench, and your breakpoints will still be present when you next open the file that contains them.

Additionally, the The Breakpoints View allows you to Skip All Breakpoints.