The BREAKPOINT procedure allows you to insert and remove breakpoints in programs for debugging. A breakpoint causes program execution to stop after the designated statement is executed. Breakpoints are specified using the source file name and line number. For multiple-line statements (statements containing "$", the continuation character), specify the line number of the last line of the statement.

You can insert breakpoints in programs without editing the source file. Enter the following :


to display the breakpoint table which gives the index, module and source file locations of each breakpoint.

Calling Sequence

BREAKPOINT [, File], Index



An optional string argument that contains the name of the source file. Note that if File is not in the current directory, the full path name must be specified even if File is in one of the directories specified by !PATH.


The line number at which to clear or set a breakpoint.



Set this keyword equal to an integer n . Execution will stop only after the n th time the breakpoint is hit. For example:


sets a breakpoint at the eighth line of the file , but only stops execution after the breakpoint has been encountered three times.


Set this keyword to remove a breakpoint. The breakpoint to be removed is specified either by index, or by the source file and line number. Use command HELP, /BREAKPOINT to display the indices of existing breakpoints. For example:

BREAKPOINT, /CLEAR, 3 ; Clear breakpoint with an index of 3.

BREAKPOINT, /CLEAR, '',8 ; Clear the breakpoint corresponding to the statement in the file, line number 8.


Set this keyword to a string containing an IDL expression. When a breakpoint is encountered, the expression is evaluated. If the expression is true (if it returns a non-zero value), program execution is interrupted. The expression is evaluated in the context of the program containing the breakpoint.

; If i is greater than 2 at line 6 of, the program is interrupted.


Set this keyword to make the breakpoint temporary. If ONCE is set, the breakpoint is cleared as soon as it is hit. For example:


sets a breakpoint at line 12 of . Execution stops when line 12 is encountered the third time, and the breakpoint is automatically cleared.


Set this keyword to set a breakpoint at the designated source file line. If this keyword is set, the first input parameter, File must be a string expression that contains the name of the source file. The second input parameter must be an integer that represents the source line number.

For example, to set a breakpoint at line 23 in the source file , enter:


See Also