Release 10.1A: OpenEdge Development:
Debugging and Troubleshooting

> ## Source code pane

> The source code pane displays a read-only debug listing including breakpoints and the current line of execution. It can contain the executing procedure or any other procedure whose listing you want to see. The name of the procedure whose listing the Debugger displays appears in the Debugger title bar. For more information, see the "Debugger title bar" section.

> The source code pane has a context (right-click) menu containing the following options: Copy, Find, Find Next, Find Previous, Add Breakpoint, Remove Breakpoint, Enable Breakpoint, Disable Breakpoint, Run to Line, and Add Watch (adds the selected item to the watches pane).

> ##### Debug listing

> The debug listing is a specially prepared source code listing that lets you set breakpoints and follow the course of procedure execution in an application. It is an expanded listing file OpenEdge creates during procedure compilation.

> The format of a debug listing is similar to the standard OpenEdge compiler listing. Like compiler listings, debug listings expand all preprocessor, include file, and parameter references. The main difference is that the text in debug listings contains only numbered source code lines without headings, page formatting, or any of the other internal data information (such as buffer and frame use) usually provided by compiler listings.

> Line numbers appear in the source code pane if you select the Include Source Line Numbers option in the Preferences dialog box. For more information, see the "Preferences dialog box" section. The Debugger displays line numbers by default.

> The Debugger displays the listing for the executing procedure each time it receives control (for example, at a breakpoint). If the Debugger cannot find the debug listing for the procedure, it tries to generate it from the procedure source code. If the Debugger can find only the r-code for the procedure, it displays the procedure name and line number in the status bar as you step through the procedure.

> For more information on procedure source files and debug listing files derived from procedure files, see the "Debugger files" section.

> ##### Listing indicators

> When the source code pane displays the listing for the executing procedure or any procedure on the call stack, it also displays two listing indicators: a line pointer that shows the next line to execute and a breakpoint indicator that shows each line where a breakpoint is set. Table 3–1 lists the Debugger listing indicators.

> Table 3–1: Listing indicators
> Icon | Description
> --- | ---
> | The line pointer indicator for the executing procedure appears in green to the left of the next executable line. When you are viewing a procedure on the call stack other than the active procedure, the line pointer appears in yellow.
> | The breakpoint indicator appears in red to the left of each line where a breakpoint is set. Disabled breakpoints appear as red outlines. For information on maintaining breakpoints in a procedure, see the "Breakpoints dialog box" section.

> ##### Text selection

> You can select one full or partial line of source code to set watches or copy to the clipboard.

> ##### Run to Line command

> The Run to Line command continues program execution until it reaches a selected line of 4GL code. Execution resumes with the selected line. If the Debugger encounters a breakpoint or interrupt before reaching the selected line, execution stops, and the Debugger cancels the command. The execution pointer is at the break or interrupt line.

> If the selected line is not an executable line of code, the Debugger stops execution on the first executable line after the selected line. If there are no executable lines of code on or after the selected line, the Debugger stops execution on the last executable line of code in the procedure file.

> If program execution ends before the Debugger reaches the selected line, the Debugger cancels Run to Line, and the debugging session ends.

> | To issue Run to Line, right-click on the chosen line in the source code pane and choose Run to Line from the context (right-click) menu.

> You can select a line in any procedure file open in the Debugger. The selected line does not have to be in the current procedure.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095