JDeveloper supports both PL/SQL and Java stored procedures debugging in a single IDE tool. When debugging PL/SQL, the source code you are debugging must be stored in the Oracle database. For Java stored procedures, the source code should be in your JDeveloper project and the compiled code should be deployed in the database.
Also, the way the debug action is initiated is different depending on whether you are performing local or remote debugging. When debugging PL/SQL, this distinction is described as follows:
PL/SQL and Java stored procedure debugging information is displayed in the various JDeveloper debugger windows including the Smart Data, Data, Watches, Inspector, Stack, and Classes windows. The Threads window, Heap window, and Monitors window are not applicable when debugging PL/SQL code. Press F1 or click Help in the debugger window for additional notes regarding debug information that the debugger generates.
When debugging PL/SQL, the user can use PL/SQL expressions in the
Watches and Inspector windows as well as conditional breakpoints,
including table element access; for example, mytable(i*10)
.
This capability includes tables which are declared in functions,
procedures, packages, and package bodies.
This topic contains information which applies to debugging both local and remote PL/SQL programs and Java stored procedures in the Oracle database:
You can debug a PL/SQL program calling PL/SQL, PL/SQL calling a Java stored procedure (Oracle9i Release 2 database only), and a PL/SQL program issuing a SQL statement that fires a trigger.
You can initiate debugging PL/SQL from the following objects:
Any other PL/SQL object can be traced into as long as it meets the prerequisites, and as long as it is invoked from one of the above.
When debugging PL/SQL code residing in the Oracle9i Release 2
database or later, the debugger uses the database's new JPDA (Java
Platform Debugger Architecture) implementation. JPDA is the industry
standard for Java debugging and the JPDA implementation in the database
allows you to seamlessly debug Java and PL/SQL. For debugging code
residing in the Oracle8i or Oracle9i Release 1
databases, the debugger uses a different API (DBMS_DEBUG
package) which provides less detail in the debugger windows.
Depending on your database version, the debug information from PL/SQL code displays differently in the JDeveloper debugger windows. However, editing PL/SQL code in the JDeveloper Code Editor is the same regardless of database version.
The main differences between debugging on the Oracle8i Release 8.1.7 or Oracle9i Release 1 databases and debugging on the Oracle9i Release 2 database are as follows
The following are issues encountered when debugging against an Oracle8 i or Oracle9i Release 1 database. These are limitations of the older API and will not be fixed.
The JDeveloper data-related windows including the Data window, the Watches window, and the Inspector windows can display variables which are scalar types such as NUMBER, VARCHAR2, and the like. Other more complex types are also displayed including:
my_rec.my_field
.
DBMS_DEBUG_JDWP.CONNECT_TCP( <host_name>,
<port> )
For local debugging, JDeveloper issues this command for you. For remote debugging, you will need to issue this command in the same session that you use to call the PL/SQL you want to debug.
v_value
or
V_Value
. Package variables are also case-insensitive, but the
prefix leading up to the variable name is case-sensitive; for example:
$Oracle.Package.SCOTT.MY_PACKAGE.g_var
The simplest way to add a package variable to the Watches window is to drag and drop the variable from the Data Window or to drag and drop the package from the Classes Window.
Related topics
Copyright © 1997, 2004, Oracle. All rights reserved.