Debug by controlling breakpoints from an ABL procedure
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
To start the Debugger and control breakpoints from an ABL procedure:
- Optionally, define a logical variable you can use to assign the return
value for
DEBUGGERsystem handle methods. - Add a
DEBUGGERsystem handle statement that invokes theINITIATE( )method before the point where you want to begin debugging. This initializes the Debugger but does not immediately make it visible. - Add one or more
DEBUGGERsystem handle statements that invoke theSET-BREAK( )method to set at least one breakpoint that occurs after the statement where you set it. TheSET-BREAK( )method that sets the breakpoint must also execute after the statement that invokes theINITIATE( )method in the previous step. - Run the invoking procedure.
For example, in the following listing fragment, the Debugger is initialized on line 3, and the procedure stops at a breakpoint on line 11. The Debugger takes control at this point. From here, you can continue executing the invoking procedure under Debugger control, stopping at and continuing from all breakpoints, as shown:
|
When you exit the Debugger, the AVM instance continues execution from its current stopping (or breaking) point. If you exit the procedure before exiting the Debugger, the Debugger window closes and control returns to the startup environment (such as the Procedure Editor or AppBuilder).