Previous Application Programming: Debugging and Error-Handling Next

Debugging and Error-Handling Overview

There are several tools you can use to help you find errors in your IDL code. The Run menu item in the IDL Development Environment provides several ways to access IDL's built-in debugging and executive commands. The Variable Watch Window helps you keep track of the variables used in your program.

This chapter explains the debugging commands and contains short examples using the IDLDE interface to debug a file. This section also discusses error-handling routines and methods used to check and handle errors that occur in IDL programs. The routines covered here are rarely used interactively.


Note
The !ERROR_STATE system variable is updated when errors occur. At the beginning of an IDL session, !ERROR_STATE contains default information. To see this information, you can either view !ERROR_STATE from the System field of the Variable Watch Window (see The Variable Watch Window) or you can enter PRINT, !ERROR_STATE at the Command Line. After an error has occurred, all of the fields of !ERROR_STATE display their updated status. Refer to !ERROR_STATE for details.

  IDL Online Help (March 06, 2007)