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 (11)

PPT
07 Using Oracle-Supported Package in Application Development
rehaniltifat
 
PPTX
Esewa presentation
juniordiwas
 
PDF
The Oberoi Group
Best Workplaces Conference
 
PPTX
Interview Questions For C Language .pptx
Rowank2
 
PPTX
An Analysis On The Dove Campaign by a JRE Student
JREGroupofInstitutions
 
PPTX
JW marriot
OmkarMore750800
 
PPT
11 Understanding and Influencing the PL/SQL Compilar
rehaniltifat
 
PDF
Nishanth Resume
Nishanth Balamurugan
 
DOCX
Assignment taj hotels services by nilesh shukla
NILESH SHUKLA
 
PPT
INPUT BOX- VBA
ViVek Patel
 
PPT
08 Dynamic SQL and Metadata
rehaniltifat
 
07 Using Oracle-Supported Package in Application Development
rehaniltifat
 
Esewa presentation
juniordiwas
 
The Oberoi Group
Best Workplaces Conference
 
Interview Questions For C Language .pptx
Rowank2
 
An Analysis On The Dove Campaign by a JRE Student
JREGroupofInstitutions
 
JW marriot
OmkarMore750800
 
11 Understanding and Influencing the PL/SQL Compilar
rehaniltifat
 
Nishanth Resume
Nishanth Balamurugan
 
Assignment taj hotels services by nilesh shukla
NILESH SHUKLA
 
INPUT BOX- VBA
ViVek Patel
 
08 Dynamic SQL and Metadata
rehaniltifat
 

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)

PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
The Future of Artificial Intelligence (AI)
Mukul
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 

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.