Super Quick Start
If you'd like to begin experimenting with the IDL Workbench right away, before reading any more, try the following things:
Quickly Display an Image
Open the examples.tif file from the IDL distribution:
Things to Notice
Quickly Create a Plot from an Existing Variable
You can use the Visualize perspective to quickly create a plot:
- Switch to the Visualize perspective by clicking the
icon in the upper right corner of the IDL Workbench. - Click the
icon or select File → Open File... to display the file selection dialog. - Browse to the
examples/datasubdirectory of your IDL 7.1 installation. - Select the file
plot_data.sav. - Notice that a new variable named
PLOT_DATAappears in the Variables view.PLOT_DATAis a structure variable containing three vectors; click on the plus sign to the left of the variable name to see the individual vectors. - Drag the variable
TEMP1from the Variables view to the Plot icon in the Tool Palette view.
Things to Notice
Open a .pro File
Open the file xdice.pro from the IDL distribution:
Alternately, click xdice.pro to open the file.
Things to Notice
Compile the .pro File
To compile the xdice.pro file, click the
icon, press Ctrl-F8, or select Run → Compile xdice.pro.
Things to Notice
Run the Routine
To run the XDICE program, click the
icon, press F8, or select Run → Run xdice Alternately, enter xdice in the Command Line view.
Things to Notice
Close the .pro File
To close the file, click the X on the editor tab:
. Alternately, press Ctrl-W, or select File → Close.
Create a New .pro File
To create a new .pro file, click the
icon or select File → New IDL Source File. A new editor window appears.
Paste the following text into the editor window:
PRO tinyRoutine ; Create a string variable myString = 'This is a tiny IDL routine' PRINT, mystring ; Create some other variables myNumber = 4 myResult = STRING(myNumber * !PI) ; Display the myResult variable void = DIALOG_MESSAGE('Result: '+myResult) END
Things to Notice
Save the .pro File to a Project
By default, the IDL Workbench saves .pro files into a project stored in your workspace. (The contents of your workspace are displayed in the view.)
Unless you have renamed or removed it yourself, your workspace includes a project named "Default." To save your new .pro file, click the
icon or select File → Save. Because your new file has not been saved previously, the Save As dialog appears. Select "Default" as the parent folder and click OK, accepting the default filename (tinyroutine.pro).
Things to Notice
Set a Breakpoint
If you click the
icon, press F8, or select Run → Run tinyroutine you will notice that your new routine prints a string to the Console view, displays a dialog, and ends. If you wanted to temporarily stop execution of your routine somewhere in the middle, you would use a breakpoint.
To test the IDL Workbench breakpoint features:
- Position the cursor on the words
PRINT, myStringin the editor window. - Press Ctrl-Shift-B or select Run → Toggle breakpoint. A blue dot appears in the left-hand margin of the editor window.

- Run the
tinyroutineprogram again (press F8, click the
icon, or select Run → Run tinyroutine). If this is the first time you have run a program with a breakpoint (or an error), you will see the Confirm Perspective Switch dialog:

- Press F6, click the
icon (on the toolbar in the Debug view), or select Run → Step Over. Note how Debug, Console, Variables, and Editor views adjust as you repeatedly step through your code. - When you have stepped to the end of the tinyroutine (you will see the words % Stepped to: $MAIN$ in the Console view), click the IDL icon on the Perspective toolbar

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.
Click Yes to display the IDL Debug perspective. (To learn more about perspectives, see the Tour of the IDL Workbench Interface.) The IDL Workbench interface is rearranged to add several new views at the top of the screen: Debug, Variables, and Breakpoints.
Notice that the Variables view contains entries for the four variables defined in the tinyroutine routine, but that only the MYSTRING variable is defined. It is also instructive to examine the contents of the Debug and Console views when IDL stops at a breakpoint.
to return to the IDL perspective.
Things to Notice
- The values in the Variables view update as you step through your code.
- When execution is stopped at a breakpoint, hovering the mouse pointer over a variable name will display the variable's value in a pop-up window. This method of viewing variable values is useful if the Variables view is obscured, or if the variable you are interested in has scrolled out of view.
- There are multiple ways to continue execution of your code after stopping at a breakpoint. For example, you can press F8, Click the
icon, or select Run → Resume to continue normal execution rather than stepping through your code one line at a time. See Debugging Tools for an in-depth discussion.
Edit and Save the .pro File
Modify the line in tinyroutine.pro that says myNumber = 4, replacing the 4 with some other number. The Editor tab displays an asterisk next to the file name to indicate that the file has been modified:

Click the
icon, press Ctrl-S, or select File → Save to save the change.
Things to Notice
Context-Sensitive Help
In the Editor view, hover the mouse pointer over the DIALOG_MESSAGE function. After a second, the following window appears:

This display (known as "hover help") shows you the syntax for the routine over which you are hovering.
Now click on the string DIALOG_MESSAGE so that the cursor is located somewhere within the string. Press F1 (Windows), Shift-F1 (Linux/Solaris), or the Help key (Macintosh). The full IDL help entry for the DIALOG_MESSAGE routine is displayed. (See Using IDL Help for an in-depth discussion of ways to display IDL help topics.)
Finally, begin a new line in the editor and type the following:
Without moving the cursor from the end of the word "dialog", press Ctrl-space. The following window appears:

This display is known as "content assist." Use the arrow keys or a mouse to select DIALOG_PICKFILE() from the list, and the syntax and keywords for the DIALOG_PICKFILE function display. Press Enter and the function name is inserted into the editor window.
Further Reading
This section has introduced you to some of the most useful features of the IDL Workbench. To learn more, explore the IDL online help system. We suggest the following as topics to read early in your explorations:
icon in the upper right corner of the IDL Workbench.
tab to the left of the editor window. The outline shows the two routines included in the file 