Breakpoints and Debugging
The IDL Workbench provides robust tools for finding and correcting problems in your code.
Breakpoints
To set a breakpoint, place the cursor on the line where you want the breakpoint to appear and press Ctrl-Shift-B or select Run → Toggle breakpoint. A blue dot appears in the left-hand margin of the editor window.

You can also toggle breakpoints on and off by double-clicking in the left-hand margin next to the line of code on which you want IDL to pause.
Viewing Variable Values
When you run a routine that contains a breakpoint, IDL will halt execution when it reaches the breakpoint. When execution is halted, you can inspect the value of variables in the current execution scope using the Variables View or by hovering the mouse pointer over a variable in the editor.
Stepping Through Code
When execution is halted due to a breakpoint or an error, you can execute single statements using the Step commands on the Run menu. See Stepping Through Code for details.
Debug Perspective
The Debug perspective is a collection of views that are generally useful when execution has halted due to a breakpoint or error. See Debug Perspective for details.