DBA Tips Archive for Oracle
Using JDeveloper for PL/SQL Coding and Debugging
by Jeff Hunter, Sr. Database Administrator
If you thought JDeveloper was only for coding in Java, well, think again! JDeveloper
allows you to work with Java, HTML, XML, SQL, and PL/SQL in a tightly integrated GUI environment.
Another significant advantage with JDeveloper 9i is that it is written totally in Java, allowing
it to be run on Linux, Windows, Solaris, and even a Macintosh.
One exciting feature that all Oracle developers will find useful in JDeveloper, is its
integrated PL/SQL environment. Not only can you create, edit, and compile PL/SQL, so can
debugging be accomplished through an integrated and interactive debugging environment. The
debugging environment for PL/SQL works in much the same way in which you would use within the
Java environment. The Oracle developer can Set Breakpoints, Watch Variables, Step Over, Step Into,
Step Out, and so on. These features are available for any Oracle8i database or later.
I put together a few notes that may help assist while developing and debugging PL/SQL code using
- JDeveloper supports creating, editing and debugging both Java and PL/SQL code.
- JDeveloper supports syntax highlighting for both Java and PL/SQL development.
- For all PL/SQL procedures that you want to trace with the debugger, will require
that they are compiled with the "Debug Information". This means several things:
- Under the Tools - Preferences menu option, use the Preferences dialog
box and click on (the left side menu) "Database Connections". Ensure that
the checkbox labeled, "Generate PL/SQL Debug Information" is checked ON.
- If the PL/SQL procedure you want to debug was NOT compiled using JDeveloper,
(where it includes the Debug Information as indicated above), make a simply change
to the PL/SQL program (add and remove a space) and save/compile the module.
- Debugging Java stored procedures is supported in the Oracle9i Release 2 database only.
- For Oracle8i or Oracle9i Release 1 databases, scalar data types such as
NUMBER and VARCHAR2 are displayed as a single, nonexpandable entry in the
Data and Watches window. For Oracle9i Release 2 databases, all data types (including scalars)
are shown as expandable entries.
- For Oracle8i or Oracle9i Release 1 databases, limited access to composite
data types is provided.
Debugging PL/SQL Code in JDeveloper
Creating an Explain Plan using SQL Worksheet
Copyright (c) 1998-2018 Jeffrey M. Hunter. All rights reserved.
All articles, scripts and material located at the Internet address of http://www.idevelopment.info is the copyright of Jeffrey M. Hunter
and is protected under copyright laws of the United States. This document may not be hosted on any other site without my express,
prior, written permission. Application to host any of the material elsewhere can be made by contacting me at firstname.lastname@example.org.
I have made every effort and taken great care in making sure that the material included on my web site is technically accurate,
but I disclaim any and all responsibility for any loss, damage or destruction of data or any other property which may arise from
relying on it. I will in no case be liable for any monetary damages arising from such loss, damage or destruction.
Last modified on
Thursday, 23-Sep-2004 00:00:00 EDT
Page Count: 15667