You can easily execute a SQL statement embedded within PL/SQL. Toad extracts the SQL statement and adjusts the syntax as necessary. Any identifier which is not a column of a referenced object is treated as a bind variable. If the identifier is a reference to a PL/SQL constant, the bind variable value defaults to the constant value.
To execute a SQL statement within PL/SQL
Place the cursor in the statement and press SHIFT+F9. A new window displays with the extracted SQL statement.
You can execute stored procedures, functions, packages or triggers in the Schema Browser or in the Editor.
To execute stored code from the Schema Browser
To execute stored code from the Editor
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.
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.
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.