BREAKPOINT Procedure
Lets you insert and remove breakpoints in programs for debugging.
Usage
BREAKPOINT, file, line
Input Parameters
file—The name of the source file in which to insert the breakpoint.
line—Specify either a line number (integer) or a procedure/function name (string). If you specify a line number, the breakpoint is set at that line. If you specify a procedure or function name, the breakpoint is set at the beginning of the procedure or function.
Keywords
Allclear—Removes all currently set breakpoints.
Clear—Removes the breakpoint specified by its index, or by the file and line parameters. If only one input parameter is specified, it is interpreted as an index identifying the currently set breakpoint. If two input parameters are specified, they are interpreted as the file and line of the currently set breakpoint.
Set—Sets a breakpoint in the specified file at the specified line number.
Discussion
A breakpoint causes program execution to stop after the designated statement is executed. Breakpoints are specified using the source file name and line number. You can insert breakpoints in programs without editing the source file.
Once a breakpoint has stopped execution, use .CON to continue execution.
Use INFO, /Breakpoint to display the breakpoint table, which gives the index, module, line number, and file location of each breakpoint.
Examples
To clear a breakpoint:
; Clear the breakpoint with index 3.
BREAKPOINT, /Clear, 3
; Clear the breakpoint corresponding to the statement in the file
; test.pro, line number 8.
BREAKPOINT, /Clear, 'test.pro', 8
To set a breakpoint at line 23, in the source file xyz.pro:
BREAKPOINT, 'xyz.pro', 23
or
BREAKPOINT, /Set, 'xyz.pro', 23
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.