Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

PL/SQL debugger tips

Oracle Database Tips by Donald BurlesonJune 4, 2015

Question:  I'm having trouble manually debugging my PL/SQL code with display statements (utl_file.put_line).    I really need a debugger for my PL/SQL code.  Does Oracle make a debugger, or do I need to buy a third-party debug product?

Answer:  I agree, PL/SQL can be problematic to debug manually. Components of PL/SQL such as the DBMS_OUTPUT and UTL_FILE packages provided limited debugging capabilities. More complex instrumenting of PL/SQL can also be accomplished using DBMS_DEBUG but online debugging on PL/SQL is a different matter.

You can use Oracle's PL/SQL debugger (part of the free SQL Developer suite) to step through the PL/SQL code, one line at a time, and find any error:

PL/SQL is just like any other procedural language and you can insert display statements (using dbms_output.put_line) and step through the code and see exactly how the values of variables are changing.  This is the easiest form of PL/SQL debugging.

There are common PL/SQL debugging techniques.  For a full list of PL/SQL debugging tips and tricks, see Dr. Hall's book "Oracle PL/SQL Tuning Secrets", an amazing collection of PL/SQL tips for the professional programmer:

  • Use display statements - You can insert dbms_output.put_line and utl_file.put_line statements to display variable states.  But advanced PL/SQL can be problematic.  The display components of PL/SQL (dbms_output and utl_file) provide limited PL/SQL debugging capabilities.
     
  • Use dbms_debug - More complex instrumenting of PL/SQL can also be accomplished using the dbms_debug online debugging.
     
  • Use dbms_profiler - The dbms_profiler package can aid in PL/SQL debugging.
     
  • Conditional Compilation - In Oracle10g, PL/SQL conditional compilation is ideal for debugging PL/SQL.
     
  • PL/SQL debugger - You can use Oracle's PL/SQL debugger (part of the free SQL Developer suite) to step through the PL/SQL code, one line at a time, and find any error:

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.