You can debug PL/SQL and SQL scripts in Toad.
To avoid modifications to code that is being debugged, Toad does not allow you to run a query while you are running a debugging session.
Toad provides the following debug features:
Debugs PL/SQL. Using the Debugger, you can set breakpoints, watches, and see call stacks. In addition, you can view DBMS output.
Note: When using the PL/SQL Debugger and connecting to a RAC instance, you must have the TNSNAMES entry for the instance with the server directed the use connection or session here. Or, you must connect directly to an instance of the cluster without letting the server assign an instance.
|JDWP Debugger||Toad also provides a JDWP debugger for debugging PL/SQL. You must configure the JDWP Debugger prior to initial use. See Configure JDWP Debugger for more information. To use the JDWP debugger, select Debug | JDWP Debugger.|
Debugs SQL scripts. You can set breakpoints, run to cursor, step over, trace into, and halt execution of your scripts.
|Attach External Session||External debugging allows you to debug PL/SQL that is run from an external session, such as another Toad window, SQL*Plus, or any other development tool which calls Oracle stored procedures.|
Debugging in Toad requires you to select one type of debugging at a time for all database instances open per instance of Toad. For example, if you have three database connections in one instance of Toad, they must all be in the same debugging state. If you then opened another instance of Toad, with the same or different connections, they could be in a different debugging state.
To use the debugger fully with PL/SQL or Java packages, you need to compile your object with debug information. Start Debugging
In addition, if you are debugging an object that has dependent objects, you cannot step into the dependents unless they, too, are compiled with debug information. Handle Dependencies and References
To reduce the size of your code when it is ready for production, you should compile without debug information. Prepare PL/SQL Code for Production.
Toad provides an intuitive and efficient way to write, run, and test your SQL and PL/SQL code. Toad supports efficient code management for a single developer or a whole team of developers.
For all databases, you must have the Oracle Probe API v2.0 or later installed in order to debug PL/SQL using Toad.
To check the Oracle Probe API version
To find out what version of the Probe API you have, run the following anonymous PL/SQL block in the SQL editor with a DBMS Output window tab selected:
dbms_output.put_line('MAJOR='| | probe_major_ver);
dbms_output.put_line('MINOR='| | probe_minor_ver);
If the DBMS Output window displays:
Then the version of Oracle Probe API is 2.2.
You must have the DEBUG CONNECT SESSION privilege, or Oracle will not let you use DBMS_DEBUG.
You debug PL/SQL objects in the Editor.
When you open a complete package or type in the Editor, the spec and body open in separate tabs by default. However, Toad provides options to control how objects are split, reassembled, and saved. See Editor Open/Save Options in the online help for more information.
To use the debugger fully with PL/SQL or Java packages, you need to compile your object with debug information. You cannot step into code or step over unless the object was compiled with debug. You can only execute. In addition, if you are debugging an object that has dependent objects, you cannot step into the dependents unless they, too, are compiled with debug information.
To start debugging