Using the PL/SQL Debugger

TOAD has an optional symbolic debugger, a procedure that allows you to watch the execution of the code, set variables on the fly, see contents of variables, and set break points and conditions (when the debugger is to start). The debugger is toggled on or off in the Procedure Edit window by pressing the icon that looks like a bug or by accessing the Debug option on the menu bar (see Figure 16.14). The debugger lets you step through the code as it executes line-by-line. You can add and delete breakpoints (using the Debug menu item or key strokes Ctrl+Alt+B and even set conditional breakpoints. You can also check for dependencies and loops.

Figure 16.14. TOAD Debug options.


The PL/SQL Debugger has numerous options, including colors for the breakpoints, allowing watches on package variables, and choosing whether or not you want dependencies to be compiled. You can even choose to have a prompt for compiling dependencies.

To Start the Debugger:

1.
Open the Procedure Edit window from either the Database, Procedure Editor menu item, or Click the Open a New Procedure Edit window button on the main toolbar.

2.
Load a PL/SQL procedure into the editor or write a new procedure. You can load a procedure from a file on disk or you can load a procedure from an existing object in the database.

3.
Compile the procedure by pressing F9 OR by clicking the Compile button on the Procedure Editor toolbar.

4.
Press F7 (Trace Into) to step through the code. TOAD generates the symbol table required to obtain debug information for this procedure.

If you want to step into other procedures and view debug information, you'll need to click the Compile Dependencies with Debug toolbar button before beginning the debug process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.30.253