Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
OpenEdge Debugger : Introduction : Debugger features and functions : Application control : Procedure interruption
 
Procedure interruption
To selectively interrupt procedure execution, you can set or remove breakpoints, using Edit > Breakpoints. A breakpoint can be a specific line in a procedure where execution stops temporarily. When the procedure reaches a breakpoint, it halts before executing the specified line and gives control to the Debugger for your next command. The easiest way to set a breakpoint is to click in the left column of the source code pane where the procedure appears.
A breakpoint can be conditional, where evaluation of a logical expression determines whether the interruption occurs. A breakpoint can be based on encountering an error, in which case the Debugger gets control at the next executable line after the line that caused the error.
You can set and remove breakpoints in an ABL procedure, using the DEBUGGER system handle’s SET-BREAK( ) and CANCEL-BREAK( ) methods. This feature is helpful to control breakpoints at specific points in your code, regardless of how the surrounding code is modified, or to set breakpoints in include files that might appear in many different procedures.
To interrupt a running procedure and give control to the Debugger, the Debugger provides a Debug > Interrupt command. This interrupts a procedure wherever it is executing, as if it encountered a breakpoint. It is particularly useful when you want to interrupt a procedure in which you have not set a breakpoint.
Note: If you use Debug > Interrupt while an alert dialog box is displayed on the screen, or while the procedure is executing a READKEY or PAUSE statement, the Debugger does not take control until you dismiss the alert dialog box or satisfy the READKEY or PAUSE statement.
You can provide a means to interrupt a running ABL procedure by setting the SESSION system handle DEBUG-ALERT attribute to TRUE. This places a Help button on all alert boxes that provides access to a Stack Trace dialog box and the Debugger.