What is the difference between the DBMS Debugger, JDWP Debugger, and the Script Debugger and how to access them in Toad for Oracle v9.1?
Debugger Overview
Note: This extended Toad feature is only available in Toad for Oracle editions that include debugging functionality.
Toad's optional Debugger module provides you with the functionality to easily debug PL/SQL procedures, functions, and triggers. In addition, you can debug SQL scripts using Script debugging, and Java using Java debugging.
Note: There are minimum Oracle database requirements for using this feature.
Selecting Debug type
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: PL/SQL, script, or Java. If you then opened another instance of Toad, with the same or different connections, they could be in a different debugging state.
To select Debug type
From the Debug menu, select one of the following:
DBMS Debugger
JDWP Debugger
Script Debugger
Toggling Compile with Debug Information
To use the debugger fully with the PL/SQL or Java packages, you need to compile your object with debug information. If you have not compiled with debug information, in databases in versions before 10g you can step into a unit, step over and so on, but you cannot see watches unless the object is compiled with debug. In a 10g database you cannot step into code or step over unless the object was compiled with debug. You can only execute.
To compile with debug information
From the Session menu, select Toggle Compiling with Debug Information.
Note: By default this option is selected when you open the Editor. If you want it to default to unselected, you can change it in Toad Options|Execute/Compile|Default to "Compile with Debug."
Compiling Dependencies with Debug Information
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. See Dependencies for more information.
For a tutorial on using Toad's debugger, please see the Debugging Tutorials book (Debugging a Procedure or Function, or Debugging a Package).
Debugging PL/SQL
The PL/SQL Debugger works within the Editor. Using the Debugger, you can set breakpoints, watches, see call stacks, and set parameters for your code. In addition, you can debug DBMS output.
Note: When using the PL/SQL Debugger and connecting to a RAC instance, you must have the TNSNAMES entry for the instance where 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.
Debugging Java
The JDWP debugger uses the same basic user interface as the PL/SQL debugger. Because it uses the Oracle package DBMS_DEBUG_JDWP in place of the DBMS_DEBUG package to access the debugging features, it is entirely Oracle-oriented. This means that there are Oracle-imposed limitations on the debugging procedures you can use through Toad.
Script Debugging
You can also debug SQL scripts. You can work with regular editor features, and in addition, can Set Breakpoints, Run to Cursor, Step Over, Trace Into, and Halt Execution of your scripts. This will help you troubleshoot your scripts quickly. When you are in the script debugger, the debugger toolbar will display with different icons than when you are in the PL/SQL or Java debugger.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center