SlideShare a Scribd company logo
Copyright © 2019 Oracle and/or its affiliates. All rights reserved. |
Debugging PL/SQL with SQL Developer
Jeff Smith
Senior Principal Product Manager
Jeff.d.smith@oracle.com || @thatjeffsmith
Database Tools, Oracle Corp
1
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Not Just THAT SQLDev Guy…
• Database Development Tools team
• Product manager/story teller
• I bother help people online, everywhere
• Contact me for a free remote presentation for your group/company
– Jeff.d.smith@oracle.com
– @thatjeffsmith
– https://www.thatjeffsmith.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
thatJeffSmith on
• 60+ Videos
• Feature demos
• Tips & Tricks
• Short & Long Form
– SQL Developer
– SQLcl
– Data Modeler
– ORDS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
5
SQL Developer Snapshot
Time Tested
Launched in
2005
An Industry Standard
5M+ Oracle DBAs
& Developers
Always Improving
Quarterly
Releases
4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Project Raptor
 Early Adopter on OTN
2005
1.1
 File Based PL/SQL editing
 Reports
 Ships with 11gR1
1.5.x
 Localizations -
Japanese, Spanish,
Italian, German, French,
Portuguese, Chinese, &
Koreans
 Ships with 11gR2
SQLDev v1.0
 SQL Worksheet
 Procedure Editor
 The world takes notice!
1.5
 Schema Copy/Diff/Export
 Thick connections
 Versioning
 TimesTen
2.1
 Unit Testing
 Data Modeler Viewer
 Unshared SQL Worksheets
2007 201020092006
3.0
 Full Data Modeler
 View > DBA
 SQL Tuning Advisor
 Query Builder
2008 2011 2012
3.1
 New Database DIFF
 PDF Reports
 RMAN
 Data Pump
2013
3.2
 APEX Listener / ORDS
Support
 Database 12c Support
 Schema Service Support
4.0
 Java 7
 ASH/AWR/ADDM
 Color Coded Connections
 Command line Interface
4.0.3
 Optimized Code Insight
 Oracle Big Data Appliance
2014 2015 2016
4.1
 ORDS Included/Full GUI
 instance Viewer
 SQLcl
 Copy PDB to DBaaS
 Larry live demos PDB relocate @ OOW
4.2
 Real Time SQL Monitoring
 Top SQL Report
 Formatter & Other Editor Enhancements
 Easier RESTful Services Development
2017
SQLcl
 New CLI
 Modern SQL*Plus
Release History
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
2017
2017.2
 Bug Fixes
 Sharding
 Data Guard
17.3 & 17.4
 Bug Fixes
Quarterly Releases!!!
2018
Release History
18.1
 Autonomous Data Warehouse Support
 New Welcome Screen/Connections
 SQL Injection Detection
 PL/Scope SQL Statement Support
 Better Formatting
18.2 & 3
 PL/SQL Injection
Detection
 Cloud data Loads
 SQL Developer
Web
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
What does ‘debug’ mean?
 Run and watch?
 dbms/owa OUTPUT?
 Stare at your code until you decide to get coffee?
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 after
 code++
 observe
 clean up
DBMS/OWA_OUTPUT is not ‘bad’
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Coming?
 Going?
 Pause/Poke
 Play with what-if scenarios
Interactive, step-by-step experience with your code
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
The PL/SQL Debugger
 SYS.DBMS_DEBUG_JDWP
 Native SQL Developer tooling
 $0.00
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
A Tale of Two Debugging Methods
 LOCAL
Code/Session originates from SQL Developer
 REMOTE aka EXTERNAL aka Just in Time
Session kicks off and runs from your program, which then connects back
down to SQL Developer for you to debug
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Required PRIVS: DEBUG CONNECT SESSION &
EXECUTE for PL/SQL
 12c+ : Access Control Lists (Fine Grained Access)
 Open Code/Object in a code editor
 Compile for DEBUG
 Click the big ‘Bug’ button
Local Debugging
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
What happens next
 the DATABASE will CONNECT to your Machine
 not CLIENT => SERVER but SERVER => CLIENT
 ACL in 12c+ allows the DB to reach out on the network
 if this is a bridge too far…
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
DBMS_DEBUG (PROBE API)
DatabaseDebuggerDisableJDWP=true
CLIENT => SERVER
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
 Not officially supported
 Not as feature rich
 External debugging won’t work
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
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
‘stops’ 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. |
Where do we go?
Where do we go now?
Where do we go?
Oh, oh
Where do we go?
(Where do we go now?)
Mind the Call Stack
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Remote/External Debugging – cue APEX!
 APEX runs, calls PL/SQL
 hits breakpoint
 SQLDev takes over
 do debugging
 control back to APEX
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Listen for Debug Requests
SQL Developer Client Machine IP
Make sure SQL Dev is listening when APEX rings the door bell
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Setup Debugger in your Application
execute DBMS_DEBUG_JDWP.CONNECT_TCP(‘sqldev-IP’, port);
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Remember to set a breakpoint!
Executable lines of code
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Run your APEX App
 Session trips breakpoint
APEX will ‘hang’
 SQL Developer will
‘blink’ to life
 Start debugging!
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Debug!

More Related Content

What's hot (20)

Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
Jeff Smith
 
Arquitetura Node com NestJS
Arquitetura Node com NestJS
Vanessa Me Tonini
 
Perils of Page-Object Pattern
Perils of Page-Object Pattern
Anand Bagmar
 
REST API and CRUD
REST API and CRUD
Prem Sanil
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014
JWORKS powered by Ordina
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
Edureka!
 
Appium Presentation
Appium Presentation
OmarUsman6
 
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Edureka!
 
Android & iOS Automation Using Appium
Android & iOS Automation Using Appium
Mindfire Solutions
 
VTV Mobile Performace Test
VTV Mobile Performace Test
Công Nghệ - VTC Mobile
 
Eclipse IDE
Eclipse IDE
Anirban Majumdar
 
React vs Angular
React vs Angular
Appinventiv
 
Appium solution
Appium solution
Nael Abd Eljawad
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
Apigee | Google Cloud
 
React introduction
React introduction
Võ Duy Tuấn
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1
Manoj Ellappan
 
Getting started with appium
Getting started with appium
Pratik Patel
 
IEEE STUDENT BRANCH REPORTING GUIDELINES
IEEE STUDENT BRANCH REPORTING GUIDELINES
Prasanth Mohan
 
Flutter introduction
Flutter introduction
Võ Duy Tuấn
 
Ionic in 30
Ionic in 30
Ionic Framework
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
Jeff Smith
 
Perils of Page-Object Pattern
Perils of Page-Object Pattern
Anand Bagmar
 
REST API and CRUD
REST API and CRUD
Prem Sanil
 
Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014
JWORKS powered by Ordina
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
Edureka!
 
Appium Presentation
Appium Presentation
OmarUsman6
 
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Swift Tutorial For Beginners | Swift Programming Tutorial | IOS App Developme...
Edureka!
 
Android & iOS Automation Using Appium
Android & iOS Automation Using Appium
Mindfire Solutions
 
React vs Angular
React vs Angular
Appinventiv
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
Apigee | Google Cloud
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1
Manoj Ellappan
 
Getting started with appium
Getting started with appium
Pratik Patel
 
IEEE STUDENT BRANCH REPORTING GUIDELINES
IEEE STUDENT BRANCH REPORTING GUIDELINES
Prasanth Mohan
 

Similar to Debugging PL/SQL from your APEX Applications with Oracle SQL Developer (20)

Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
Jeff Smith
 
PL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL Developer
Jeff Smith
 
What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
Download full ebook of Oracle Sql Developer Narayanan Ajith instant download pdf
Download full ebook of Oracle Sql Developer Narayanan Ajith instant download pdf
dakorarampse
 
Oracle SQL Developer: You're Doing it Wrong!
Oracle SQL Developer: You're Doing it Wrong!
Jeff Smith
 
Pl sql student guide v 3
Pl sql student guide v 3
Nexus
 
Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?
Jeff Smith
 
Plsql guide 2
Plsql guide 2
Vinay Kumar
 
Oracle 11g release 2
Oracle 11g release 2
Adel Saleh
 
Oracle SQL Developer Tips & Tricks
Oracle SQL Developer Tips & Tricks
Jeff Smith
 
Hack your db before the hackers do
Hack your db before the hackers do
fangjiafu
 
Oracle institutes in Hyderabad.
Oracle institutes in Hyderabad.
sreehari orienit
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
InSync2011
 
Java full stack1
Java full stack1
pravash sahoo
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
Ashwin Kumar
 
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
Nancy Thomas
 
Oracle PLSQL Training in Chennai, Tambaram
Oracle PLSQL Training in Chennai, Tambaram
Radiant Business Solutions
 
DBMS Practical File
DBMS Practical File
Dushmanta Nath
 
Introduction to Standard Query Language.ppt
Introduction to Standard Query Language.ppt
HajarMeseehYaseen
 
Pl sql student guide v 1
Pl sql student guide v 1
Nexus
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
Jeff Smith
 
PL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL Developer
Jeff Smith
 
What's New in Oracle SQL Developer for 2018
What's New in Oracle SQL Developer for 2018
Jeff Smith
 
Download full ebook of Oracle Sql Developer Narayanan Ajith instant download pdf
Download full ebook of Oracle Sql Developer Narayanan Ajith instant download pdf
dakorarampse
 
Oracle SQL Developer: You're Doing it Wrong!
Oracle SQL Developer: You're Doing it Wrong!
Jeff Smith
 
Pl sql student guide v 3
Pl sql student guide v 3
Nexus
 
Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?
Jeff Smith
 
Oracle 11g release 2
Oracle 11g release 2
Adel Saleh
 
Oracle SQL Developer Tips & Tricks
Oracle SQL Developer Tips & Tricks
Jeff Smith
 
Hack your db before the hackers do
Hack your db before the hackers do
fangjiafu
 
Oracle institutes in Hyderabad.
Oracle institutes in Hyderabad.
sreehari orienit
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
InSync2011
 
3963066 pl-sql-notes-only
3963066 pl-sql-notes-only
Ashwin Kumar
 
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
oracle plsql training | oracle online training | oracle plsql demo | oracle p...
Nancy Thomas
 
Introduction to Standard Query Language.ppt
Introduction to Standard Query Language.ppt
HajarMeseehYaseen
 
Pl sql student guide v 1
Pl sql student guide v 1
Nexus
 
Ad

More from Jeff Smith (20)

Oracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG Edition
Jeff Smith
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
Jeff Smith
 
Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl
Jeff Smith
 
RESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous Database
Jeff Smith
 
Oracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query Results
Jeff Smith
 
Oracle Database Management REST API
Oracle Database Management REST API
Jeff Smith
 
Oracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL Server
Jeff Smith
 
REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)
Jeff Smith
 
Social Media - Why a Database Person Should Care
Social Media - Why a Database Person Should Care
Jeff Smith
 
Oracle SQL Developer Reports
Oracle SQL Developer Reports
Jeff Smith
 
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Jeff Smith
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Jeff Smith
 
REST Enabling Your Oracle Database
REST Enabling Your Oracle Database
Jeff Smith
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
If You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter Too
Jeff Smith
 
SQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle Database
Jeff Smith
 
My Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler Features
Jeff Smith
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL Developer
Jeff Smith
 
Oracle SQL Developer Data Modeler - Version Control Your Designs
Oracle SQL Developer Data Modeler - Version Control Your Designs
Jeff Smith
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
Jeff Smith
 
Oracle REST Data Services: POUG Edition
Oracle REST Data Services: POUG Edition
Jeff Smith
 
Oracle SQL Developer Tips and Tricks: Data Edition
Oracle SQL Developer Tips and Tricks: Data Edition
Jeff Smith
 
Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl
Jeff Smith
 
RESTful Services for your Oracle Autonomous Database
RESTful Services for your Oracle Autonomous Database
Jeff Smith
 
Oracle SQLcl: Formatting your Query Results
Oracle SQLcl: Formatting your Query Results
Jeff Smith
 
Oracle Database Management REST API
Oracle Database Management REST API
Jeff Smith
 
Oracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL Server
Jeff Smith
 
REST Enabling your Oracle Database (2018 Update)
REST Enabling your Oracle Database (2018 Update)
Jeff Smith
 
Social Media - Why a Database Person Should Care
Social Media - Why a Database Person Should Care
Jeff Smith
 
Oracle SQL Developer Reports
Oracle SQL Developer Reports
Jeff Smith
 
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Jeff Smith
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Jeff Smith
 
REST Enabling Your Oracle Database
REST Enabling Your Oracle Database
Jeff Smith
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
If You Oracle Then You Should Twitter Too
If You Oracle Then You Should Twitter Too
Jeff Smith
 
SQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle Database
Jeff Smith
 
My Favorite Oracle SQL Developer Data Modeler Features
My Favorite Oracle SQL Developer Data Modeler Features
Jeff Smith
 
Oracle Database 12c Feature Support in Oracle SQL Developer
Oracle Database 12c Feature Support in Oracle SQL Developer
Jeff Smith
 
Oracle SQL Developer Data Modeler - Version Control Your Designs
Oracle SQL Developer Data Modeler - Version Control Your Designs
Jeff Smith
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
Jeff Smith
 
Ad

Recently uploaded (20)

Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 

Debugging PL/SQL from your APEX Applications with Oracle SQL Developer

  • 1. Copyright © 2019 Oracle and/or its affiliates. All rights reserved. | Debugging PL/SQL with SQL Developer Jeff Smith Senior Principal Product Manager [email protected] || @thatjeffsmith Database Tools, Oracle Corp 1
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Not Just THAT SQLDev Guy… • Database Development Tools team • Product manager/story teller • I bother help people online, everywhere • Contact me for a free remote presentation for your group/company – [email protected] – @thatjeffsmith – https://www.thatjeffsmith.com
  • 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | thatJeffSmith on • 60+ Videos • Feature demos • Tips & Tricks • Short & Long Form – SQL Developer – SQLcl – Data Modeler – ORDS
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. 5 SQL Developer Snapshot Time Tested Launched in 2005 An Industry Standard 5M+ Oracle DBAs & Developers Always Improving Quarterly Releases 4
  • 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Project Raptor  Early Adopter on OTN 2005 1.1  File Based PL/SQL editing  Reports  Ships with 11gR1 1.5.x  Localizations - Japanese, Spanish, Italian, German, French, Portuguese, Chinese, & Koreans  Ships with 11gR2 SQLDev v1.0  SQL Worksheet  Procedure Editor  The world takes notice! 1.5  Schema Copy/Diff/Export  Thick connections  Versioning  TimesTen 2.1  Unit Testing  Data Modeler Viewer  Unshared SQL Worksheets 2007 201020092006 3.0  Full Data Modeler  View > DBA  SQL Tuning Advisor  Query Builder 2008 2011 2012 3.1  New Database DIFF  PDF Reports  RMAN  Data Pump 2013 3.2  APEX Listener / ORDS Support  Database 12c Support  Schema Service Support 4.0  Java 7  ASH/AWR/ADDM  Color Coded Connections  Command line Interface 4.0.3  Optimized Code Insight  Oracle Big Data Appliance 2014 2015 2016 4.1  ORDS Included/Full GUI  instance Viewer  SQLcl  Copy PDB to DBaaS  Larry live demos PDB relocate @ OOW 4.2  Real Time SQL Monitoring  Top SQL Report  Formatter & Other Editor Enhancements  Easier RESTful Services Development 2017 SQLcl  New CLI  Modern SQL*Plus Release History
  • 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 2017 2017.2  Bug Fixes  Sharding  Data Guard 17.3 & 17.4  Bug Fixes Quarterly Releases!!! 2018 Release History 18.1  Autonomous Data Warehouse Support  New Welcome Screen/Connections  SQL Injection Detection  PL/Scope SQL Statement Support  Better Formatting 18.2 & 3  PL/SQL Injection Detection  Cloud data Loads  SQL Developer Web
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | What does ‘debug’ mean?  Run and watch?  dbms/owa OUTPUT?  Stare at your code until you decide to get coffee?
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  after  code++  observe  clean up DBMS/OWA_OUTPUT is not ‘bad’
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Coming?  Going?  Pause/Poke  Play with what-if scenarios Interactive, step-by-step experience with your code
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | The PL/SQL Debugger  SYS.DBMS_DEBUG_JDWP  Native SQL Developer tooling  $0.00
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | A Tale of Two Debugging Methods  LOCAL Code/Session originates from SQL Developer  REMOTE aka EXTERNAL aka Just in Time Session kicks off and runs from your program, which then connects back down to SQL Developer for you to debug
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Required PRIVS: DEBUG CONNECT SESSION & EXECUTE for PL/SQL  12c+ : Access Control Lists (Fine Grained Access)  Open Code/Object in a code editor  Compile for DEBUG  Click the big ‘Bug’ button Local Debugging
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | What happens next  the DATABASE will CONNECT to your Machine  not CLIENT => SERVER but SERVER => CLIENT  ACL in 12c+ allows the DB to reach out on the network  if this is a bridge too far…
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | DBMS_DEBUG (PROBE API) DatabaseDebuggerDisableJDWP=true CLIENT => SERVER
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Not officially supported  Not as feature rich  External debugging won’t work
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Set a Breakpoint! OR  Configure Preferences  Start Debugging: Step Over Some Tips
  • 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Breakpoints ‘stops’ execution on a specific line OR If a condition is met
  • 21. 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
  • 22. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Where do we go? Where do we go now? Where do we go? Oh, oh Where do we go? (Where do we go now?) Mind the Call Stack
  • 23. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Remote/External Debugging – cue APEX!  APEX runs, calls PL/SQL  hits breakpoint  SQLDev takes over  do debugging  control back to APEX
  • 24. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Listen for Debug Requests SQL Developer Client Machine IP Make sure SQL Dev is listening when APEX rings the door bell
  • 25. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Setup Debugger in your Application execute DBMS_DEBUG_JDWP.CONNECT_TCP(‘sqldev-IP’, port);
  • 26. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Remember to set a breakpoint! Executable lines of code
  • 27. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Run your APEX App  Session trips breakpoint APEX will ‘hang’  SQL Developer will ‘blink’ to life  Start debugging!
  • 28. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Debug!