Controlling PL/SQL Program Execution
You can control the execution of a PL/SQL program using most of the Visual Studio debugging commands available for other types of programs, however, the following debugging commands are not available:
-
Set the Execution Point
-
Edit and Continue
This section includes the following topics:
Starting the Oracle PL/SQL Debugger
Starting the Oracle PL/SQL Debugger is different for each of the three debugger modes. See the specific mode documentation for information on how to start the debugger:
Stepping Through a PL/SQL Program
You can step through the debugging execution using the debug step commands from the Visual Studio Debug menu or the Debug Toolbar.
Step Into
This command single-steps through source statements in a PL/SQL program.
You cannot step into an object method during debugging.
If a source statement is a call to other PL/SQL programs, the debugger enters the called PL/SQL program or programs. From there, how the debugger behaves depends on whether or not any called PL/SQL programs are compiled with the debug information as follows:
-
If the called PL/SQL programs are compiled with debug information, the debugger stops at the entry point of each program.
-
If the called PL/SQL programs are not compiled with the debug information, a message box appears with several choices. This is described in Behavior for PL/SQL Programs Compiled Without Debug Information.
Step Over
This command single-steps through source statements in a PL/SQL program.
If a source statement is a call to another PL/SQL program, the debugger stops at the next breakpoint or executes that PL/SQL program, and stops at the next source statement or the next breakpoint.
Continuing the Debug Execution
When the debugging process stops at a specific location, you can select Continue from the Visual Studio Debug Menu or from the Debug Toolbar to continue the PL/SQL program execution.
Stopping the Debug Processing
You can select Stop Debugging from the Visual Studio Debug Menu or from the Debug Toolbar to stop the PL/SQL program execution.
Breaking PL/SQL Program Execution
You can command the debugger to break into the PL/SQL debugging process, by selecting Break All from the Visual Studio Debug Menu or from the Debug Toolbar.
Running to the Cursor Location
When a PL/SQL program stops, you can command the debugger to stop program execution at a cursor location, as follows:
- Open the PL/SQL program in the source window.
- Place the cursor where you want the execution to stop.
- Right-click and from the menu, select Run To Cursor.