SlideShare a Scribd company logo
6
Most read
7
Most read
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Oracle SQL Developer
PL/SQL Debugging
Jeff Smith
Jeff.d.smith@oracle.com || @thatjeffsmith
Senior Principal Product Manager
Database Development Tools Group
Oracle Confidential – Internal/Restricted/Highly Restricted
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Gentle Introduction to Debugging
 Worksheet vs Procedure Editor
 Debug Demo
 How it works – boring architectural stuff
 Advanced Debugger ‘Tricks’
Today’s Mission: Debugging PL/SQL < 5 Minutes
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 FREE Oracle Database IDE/GUI
 Windows, OS X, *NIX
 More than 4,000,000 users worldwide
 My Oracle Support available via your DB license
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Project Raptor 2005 ~ Oracle SQL Developer v1.0 2006
 1.5 2008
 2.1 2009
 3.0 2011
 3.1, 3.2 2012
 4.0 2013
 4.0.3 2014
 4.1 May 2015
Release History
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Run program, see what happens
 Add a bunch of DBMS_OUTPUT code
 Use your IDE to ‘step’ interactively through the PL/SQL program(s)
What do we mean by ‘Debug?’
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 After the fact
 Extra Coding
 Not interactive
 Don’t forget to remove
before Production
DBMS_OUTPUT is Better than Nothing
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Confirm required PRIVS (DEBUG CONNECT SESSION)
 If 12c, configure Access Control (Fine Grained Access)
 Open Code – in the Procedure Editor
 Compile for DEBUG
 Click the big ‘Bug’ button
How to Launch a Debug Session
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Set a Breakpoint! OR
 Configure Preferences
 Start Debugging: Step Over
Some Tips
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Breakpoints
‘Pauses’ execution
on a specific line
OR
If a condition is met
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Step Over vs Step Into
 Step Over – Executes line 51, goes to line 54
 Step Into – Opens program at line 51 for debugging
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
See where
you’ve been
and where
you’re going
Mind the Call Stack
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Remote/External Debugging
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Listen for Debug Requests
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
execute DBMS_DEBUG_JDWP.CONNECT_TCP('127.0.0.1',4000);
create or replace
FUNCTION GET_EMP_NAME
(
ID IN NUMBER
) RETURN VARCHAR2 AS
name varchar2(100);
BEGIN
select first_name||' '||last_name into
name from employees
where employee_id = ID;
RETURN name;
END GET_EMP_NAME;
Setup Debugger in your Application (hard way)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Just set an ENV VARIABLE!
ORA_DEBUG_JDWP=host=mypc;port= 1234
Enable Application for debugging (the EASY way)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Advantages over
SQL Worksheet:
 Package body, jump
to Spec and vice versa
 ‘Breadcrumbs’
 Highlighted compiler
errors and warnings by
default
Procedure Editor – a PL/SQL aware IDE
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
SQL Developer Resources
• SQL Developer on OTN
– www.oracle.com/sqldeveloper
• Feature Exchange
– sqldeveloper.oracle.com
• Forums
– https://forums.oracle.com/forums/forum.jspa?forumID=260
• Oracle Learning Library
– www.oracle.com/oll

More Related Content

What's hot (20)

PDF
Practical Object Oriented Models In Sql
Karwin Software Solutions LLC
 
PDF
Java Collections Tutorials
Prof. Erwin Globio
 
PPT
09 Managing Dependencies
rehaniltifat
 
PPTX
Expose your data as an api is with oracle rest data services -spoug Madrid
Vinay Kumar
 
PPTX
Project Lombok!
Mehdi Haryani
 
PPT
Subqueries -Oracle DataBase
Salman Memon
 
PPT
Cursores.ppt
Alan737817
 
PDF
Java Deserialization Vulnerabilities - The Forgotten Bug Class (RuhrSec Edition)
CODE WHITE GmbH
 
PDF
Triggers in plsql
Arun Sial
 
PDF
Introduction to Apex Triggers
Salesforce Developers
 
PPT
Les06 (using subqueries to solve queries)
Achmad Solichin
 
PDF
Oracle APEX Cheat Sheet
Dimitri Gielis
 
PDF
Champions
Silver Caprice
 
PPT
Apex Trigger Debugging: Solving the Hard Problems
Salesforce Developers
 
PPTX
Java arrays
Jin Castor
 
PPT
Oracle Forms : Validation Triggers
Sekhar Byna
 
PDF
Bootiful Development with Spring Boot and React
VMware Tanzu
 
PDF
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
PostgresOpen
 
PPTX
MongoDB - External Authentication
Jason Terpko
 
PDF
Demystifying OAuth 2.0
Karl McGuinness
 
Practical Object Oriented Models In Sql
Karwin Software Solutions LLC
 
Java Collections Tutorials
Prof. Erwin Globio
 
09 Managing Dependencies
rehaniltifat
 
Expose your data as an api is with oracle rest data services -spoug Madrid
Vinay Kumar
 
Project Lombok!
Mehdi Haryani
 
Subqueries -Oracle DataBase
Salman Memon
 
Cursores.ppt
Alan737817
 
Java Deserialization Vulnerabilities - The Forgotten Bug Class (RuhrSec Edition)
CODE WHITE GmbH
 
Triggers in plsql
Arun Sial
 
Introduction to Apex Triggers
Salesforce Developers
 
Les06 (using subqueries to solve queries)
Achmad Solichin
 
Oracle APEX Cheat Sheet
Dimitri Gielis
 
Champions
Silver Caprice
 
Apex Trigger Debugging: Solving the Hard Problems
Salesforce Developers
 
Java arrays
Jin Castor
 
Oracle Forms : Validation Triggers
Sekhar Byna
 
Bootiful Development with Spring Boot and React
VMware Tanzu
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
PostgresOpen
 
MongoDB - External Authentication
Jason Terpko
 
Demystifying OAuth 2.0
Karl McGuinness
 

Viewers also liked (10)

PPTX
REST Enabling Your Oracle Database
Jeff Smith
 
PPTX
PL/SQL All the Things in Oracle SQL Developer
Jeff Smith
 
PPTX
PLSQL Developer tips and tricks
Patrick Barel
 
PPTX
Oracle SQL Developer Top 10 Tips & Tricks
Jeff Smith
 
PPTX
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Jeff Smith
 
PDF
Teradata Demand Chain Management (DCM): Version 4
Teradata
 
PPT
Lapsed policy
Rohit V Gala
 
PDF
Krótka historia email marketingu, czyli jak stworzyć najlepszego narzędzie d...
Pawel Sala
 
PDF
Condition monitoring of steam turbines
Ray Beebe
 
PDF
EHS Student Agenda - 2012-13
brandongrummer
 
REST Enabling Your Oracle Database
Jeff Smith
 
PL/SQL All the Things in Oracle SQL Developer
Jeff Smith
 
PLSQL Developer tips and tricks
Patrick Barel
 
Oracle SQL Developer Top 10 Tips & Tricks
Jeff Smith
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Jeff Smith
 
Teradata Demand Chain Management (DCM): Version 4
Teradata
 
Lapsed policy
Rohit V Gala
 
Krótka historia email marketingu, czyli jak stworzyć najlepszego narzędzie d...
Pawel Sala
 
Condition monitoring of steam turbines
Ray Beebe
 
EHS Student Agenda - 2012-13
brandongrummer
 
Ad

Similar to Debugging PL/SQL with Oracle SQL Developer (20)

PPTX
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer
Jeff Smith
 
PPTX
Oracle SQL Developer Tips & Tricks
Jeff Smith
 
PPTX
Oracle SQL Developer for the DBA
Jeff Smith
 
PPTX
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
PPTX
Oracle Database 12c Feature Support in Oracle SQL Developer
Jeff Smith
 
PPTX
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Jeff Smith
 
PPTX
Database as a Service, Collaborate 2016
Kellyn Pot'Vin-Gorman
 
PPTX
Oracle SQL Developer for SQL Server?
Jeff Smith
 
PPTX
Oracle SQL Developer: You're Doing it Wrong!
Jeff Smith
 
PPTX
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
PDF
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Mark Matthews
 
PPTX
Optimizing the Enterprise Manager 12c
Kellyn Pot'Vin-Gorman
 
PPTX
Oracle Open World Exadata Monitoring and Management with EM12c
Kellyn Pot'Vin-Gorman
 
PPTX
SQLcl overview - A new Command Line Interface for Oracle Database
Jeff Smith
 
PDF
Developer day v2
AiougVizagChapter
 
PDF
New Not Your Father's Enterprise Manager
Kellyn Pot'Vin-Gorman
 
PPTX
IOUG at Coors Field ASH and AWR in EM12c!
Kellyn Pot'Vin-Gorman
 
PPTX
AWR and ASH Deep Dive
Kellyn Pot'Vin-Gorman
 
PPTX
Kellyn Pot'Vin-Gorman - Awr and Ash
gaougorg
 
Debugging PL/SQL from your APEX Applications with Oracle SQL Developer
Jeff Smith
 
Oracle SQL Developer Tips & Tricks
Jeff Smith
 
Oracle SQL Developer for the DBA
Jeff Smith
 
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Jeff Smith
 
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Jeff Smith
 
Database as a Service, Collaborate 2016
Kellyn Pot'Vin-Gorman
 
Oracle SQL Developer for SQL Server?
Jeff Smith
 
Oracle SQL Developer: You're Doing it Wrong!
Jeff Smith
 
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Mark Matthews
 
Optimizing the Enterprise Manager 12c
Kellyn Pot'Vin-Gorman
 
Oracle Open World Exadata Monitoring and Management with EM12c
Kellyn Pot'Vin-Gorman
 
SQLcl overview - A new Command Line Interface for Oracle Database
Jeff Smith
 
Developer day v2
AiougVizagChapter
 
New Not Your Father's Enterprise Manager
Kellyn Pot'Vin-Gorman
 
IOUG at Coors Field ASH and AWR in EM12c!
Kellyn Pot'Vin-Gorman
 
AWR and ASH Deep Dive
Kellyn Pot'Vin-Gorman
 
Kellyn Pot'Vin-Gorman - Awr and Ash
gaougorg
 
Ad

More from Jeff Smith (16)

PPTX
Oracle REST Data Services: POUG Edition
Jeff Smith
 
PPTX
Oracle SQL Developer Tips and Tricks: Data Edition
Jeff Smith
 
PPTX
Change Management for Oracle Database with SQLcl
Jeff Smith
 
PPTX
RESTful Services for your Oracle Autonomous Database
Jeff Smith
 
PPTX
Oracle SQLcl: Formatting your Query Results
Jeff Smith
 
PPTX
Oracle Database Management REST API
Jeff Smith
 
PPTX
Oracle REST Data Services: Options for your Web Services
Jeff Smith
 
PPTX
Oracle SQL Developer Data Modeler - for SQL Server
Jeff Smith
 
PPTX
REST Enabling your Oracle Database (2018 Update)
Jeff Smith
 
PPTX
Social Media - Why a Database Person Should Care
Jeff Smith
 
PPTX
Oracle SQL Developer Reports
Jeff Smith
 
PPT
If You Oracle Then You Should Twitter Too
Jeff Smith
 
PPTX
My Favorite Oracle SQL Developer Data Modeler Features
Jeff Smith
 
PPTX
Oracle SQL Developer Data Modeler - Version Control Your Designs
Jeff Smith
 
PPTX
Dimensional modeling in oracle sql developer
Jeff Smith
 
PPTX
Oracle SQL Developer version 4.0 New Features Overview
Jeff Smith
 
Oracle REST Data Services: POUG Edition
Jeff Smith
 
Oracle SQL Developer Tips and Tricks: Data Edition
Jeff Smith
 
Change Management for Oracle Database with SQLcl
Jeff Smith
 
RESTful Services for your Oracle Autonomous Database
Jeff Smith
 
Oracle SQLcl: Formatting your Query Results
Jeff Smith
 
Oracle Database Management REST API
Jeff Smith
 
Oracle REST Data Services: Options for your Web Services
Jeff Smith
 
Oracle SQL Developer Data Modeler - for SQL Server
Jeff Smith
 
REST Enabling your Oracle Database (2018 Update)
Jeff Smith
 
Social Media - Why a Database Person Should Care
Jeff Smith
 
Oracle SQL Developer Reports
Jeff Smith
 
If You Oracle Then You Should Twitter Too
Jeff Smith
 
My Favorite Oracle SQL Developer Data Modeler Features
Jeff Smith
 
Oracle SQL Developer Data Modeler - Version Control Your Designs
Jeff Smith
 
Dimensional modeling in oracle sql developer
Jeff Smith
 
Oracle SQL Developer version 4.0 New Features Overview
Jeff Smith
 

Recently uploaded (20)

PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
Alpha Altcoin Setup : TIA - 19th July 2025
CIFDAQ
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
visibel.ai Company Profile – Real-Time AI Solution for CCTV
visibelaiproject
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
How a Code Plagiarism Checker Protects Originality in Programming
Code Quiry
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
PDF
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
UiPath on Tour London Community Booth Deck
UiPathCommunity
 
PDF
Productivity Management Software | Workstatus
Lovely Baghel
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
Alpha Altcoin Setup : TIA - 19th July 2025
CIFDAQ
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
visibel.ai Company Profile – Real-Time AI Solution for CCTV
visibelaiproject
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
How a Code Plagiarism Checker Protects Originality in Programming
Code Quiry
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
Arcee AI - building and working with small language models (06/25)
Julien SIMON
 
CIFDAQ'S Token Spotlight for 16th July 2025 - ALGORAND
CIFDAQ
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
UiPath on Tour London Community Booth Deck
UiPathCommunity
 
Productivity Management Software | Workstatus
Lovely Baghel
 
Top Managed Service Providers in Los Angeles
Captain IT
 

Debugging PL/SQL with Oracle SQL Developer

  • 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer PL/SQL Debugging Jeff Smith [email protected] || @thatjeffsmith Senior Principal Product Manager Database Development Tools Group Oracle Confidential – Internal/Restricted/Highly Restricted
  • 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Gentle Introduction to Debugging  Worksheet vs Procedure Editor  Debug Demo  How it works – boring architectural stuff  Advanced Debugger ‘Tricks’ Today’s Mission: Debugging PL/SQL < 5 Minutes
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  FREE Oracle Database IDE/GUI  Windows, OS X, *NIX  More than 4,000,000 users worldwide  My Oracle Support available via your DB license
  • 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Project Raptor 2005 ~ Oracle SQL Developer v1.0 2006  1.5 2008  2.1 2009  3.0 2011  3.1, 3.2 2012  4.0 2013  4.0.3 2014  4.1 May 2015 Release History
  • 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Run program, see what happens  Add a bunch of DBMS_OUTPUT code  Use your IDE to ‘step’ interactively through the PL/SQL program(s) What do we mean by ‘Debug?’
  • 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  After the fact  Extra Coding  Not interactive  Don’t forget to remove before Production DBMS_OUTPUT is Better than Nothing
  • 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Confirm required PRIVS (DEBUG CONNECT SESSION)  If 12c, configure Access Control (Fine Grained Access)  Open Code – in the Procedure Editor  Compile for DEBUG  Click the big ‘Bug’ button How to Launch a Debug Session
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Set a Breakpoint! OR  Configure Preferences  Start Debugging: Step Over Some Tips
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Breakpoints ‘Pauses’ execution on a specific line OR If a condition is met
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Step Over vs Step Into  Step Over – Executes line 51, goes to line 54  Step Into – Opens program at line 51 for debugging
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | See where you’ve been and where you’re going Mind the Call Stack
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Remote/External Debugging
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Listen for Debug Requests
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | execute DBMS_DEBUG_JDWP.CONNECT_TCP('127.0.0.1',4000); create or replace FUNCTION GET_EMP_NAME ( ID IN NUMBER ) RETURN VARCHAR2 AS name varchar2(100); BEGIN select first_name||' '||last_name into name from employees where employee_id = ID; RETURN name; END GET_EMP_NAME; Setup Debugger in your Application (hard way)
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Just set an ENV VARIABLE! ORA_DEBUG_JDWP=host=mypc;port= 1234 Enable Application for debugging (the EASY way)
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Advantages over SQL Worksheet:  Package body, jump to Spec and vice versa  ‘Breadcrumbs’  Highlighted compiler errors and warnings by default Procedure Editor – a PL/SQL aware IDE
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQL Developer Resources • SQL Developer on OTN – www.oracle.com/sqldeveloper • Feature Exchange – sqldeveloper.oracle.com • Forums – https://forums.oracle.com/forums/forum.jspa?forumID=260 • Oracle Learning Library – www.oracle.com/oll

Editor's Notes

  • #2: To customize this slide with your own picture: Right-click the slide area and choose Format Background from the pop-up menu. From the Fill menu, click Picture and texture fill. Under Insert from: click File. Locate your new picture and click Insert. To Replace the LOGO on this sample slide: Right-click the sample LOGO and choose Change Picture. Navigate to the location where the new logo is stored, select desired logo file and click on the Open button to replace the sample logo.