Stepping through the code

How To... 4-131 Usage notes Running a program unit as described above only works for procedures or packaged procedures, not for functions since theres no variable for a return value to be returned to.

4.14.10 Inserting a Navigator pane in the PLSQL Interpreter

To insert an Object Navigator pane in the PLSQL Interpreter:

1. If the Interpreter is not already displayed, choose Program PLSQL Interpreter.

2. In the PLSQL Interpreter, choose View Navigator Pane to insert the Object

Navigator pane in the middle of the PLSQL Interpreter. Notice that the button bar is updated with new Object Navigator buttons. 3. Optionally, use the split bars to resize the proportions of the three panes.

4.14.11 Controlling program unit execution

Once you have inspected and modified the program state, you can resume or terminate execution using the following features: Execute these commands from either the PLSQL Interpreter toolbar or by typing the command in the PLSQL Interpreter pane.

4.14.12 Stepping through the code

To step through the code: Before proceeding, you must already have set a debug action such as a breakpoint, and run your program unit at the PLSQL Interpreter PLSQL prompt to suspend execution. To step to the next line of the suspended program unit: Table 4–10 Program unit execution Execution Feature Description STEP You can use the STEP command to temporarily resume execution of an interrupted program. Control returns to the PLSQL Interpreter after the specified set of statements have been executed. STEP Into or Over enables you to: execute the next statement optionally descending into subprogram calls resume execution until the current subprogram has returned continue execution until the specified source location is reached GO Use the GO command to resume program execution indefinitely--that is, until either the currently executing thread of execution terminates or it is interrupted again due to a debug action. RESET Use the RESET command to return control to an outer debug level without continuing execution in the current debug level. Thus, RESET effectively aborts execution at the current and possibly higher debug levels. You can explicitly reset execution to any previous debug level, or you can simply reset to top level, which is the default. 4-132 Oracle Reports Users Guide to Building Reports ■ Click the Step Into button in the PLSQL Interpreter toolbar to execute the next line of executable code in the current program unit. If the next executable line is a call to a nested subprogram a program unit that is called from within another program unit, Step Into halts execution at the first line of the nested subprogram. To step over a nested subprogram call in the suspended program unit: ■ Click the Step Over button in the PLSQL Interpreter toolbar. Step Over executes any calls to nested subprograms and then halts execution at the next executable line of the current program unit. To step out of a nested subprogram and return to the outer program unit: ■ Click the Step Out button in the PLSQL Interpreter toolbar. If you previously used Step In to descend into a nested subprogram, Step Out completes execution of the nested subprogram and returns to the next line of the original program unit. To resume program unit execution: ■ Click the Go button in the PLSQL Interpreter toolbar. Execution of the program unit continues until the program unit execution has finished, or until interrupted again by another debug action. To exit suspended execution at the current debug level: ■ Click the Reset button in the PLSQL Interpreter toolbar. Control is returned to the Interpreter, or to an outer debug level if any exist.

4.14.13 Modifying code at runtime