Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
OpenEdge Debugger : Starting and Stopping the Debugger : Debugging from alert dialog boxes
 

Debugging from alert dialog boxes

When an unhandled ABL error or .NET exception occurs—there is no CATCH or NO-ERROR logic present—in an interactive session for any ABL client, the ABL Virtual Machine (AVM) displays an Error message box. When Debug Alert is set to TRUE, the message box also includes a Help button. The Help button is also present on ABL Alert box messages. Clicking on the Help button produces a Stack Trace dialog box containing ABL stack trace and .NET stack trace information. There is also a Debug button on this dialog box for initiating the Debugger.
To enable the Debug alert feature, use the Debug Alert (-debugalert) client startup parameter or set SESSION:DEBUG-ALERT to TRUE. The following figure shows an alert dialog box with a Help button.
Figure 8. Alert dialog box with Stack Trace Help button
Note: For more information on the Debug Alert startup parameter, see the reference entry in OpenEdge Deployment: Startup Command and Parameter Reference. For more information on session handles, see UsingSystem Handles for Debugging
When you click the Help button, a Stack Trace dialog box opens, displaying the ABL stack trace for the client session currently executing. This information is helpful to determine where unhandled errors are occurring in your code. In addition to the normal ABL stack trace, the CallStack displays the .NET stack trace if the error occurs due to .NET. You can also get the CallStack information from a thrown ABL error object if it initiates the unhandled error. The most recent routine call is displayed at the top of each respective trace listing for the ABL stack, the .NET stack trace, and the error CallStack.
The following procedure describes the steps to display the stack trace feature.
* Displaying the .NET Stack Trace in the Stack Trace dialog box
* Displaying the ABL Error CallStack in the Stack Trace dialog box
* Starting the Debugger from the Stack Trace dialog box