0% found this document useful (0 votes)
135 views

Debug With PL/SQL

This document discusses how to use SQL Developer to debug PL/SQL code. It covers setting up debugging in SQL Developer, compiling and running code, setting breakpoints and watches, and debugging locally or remotely. The presentation provides an overview of SQL Developer's debugging features and walks through the steps to debug PL/SQL code, from granting permissions to debugging a procedure both locally and remotely.

Uploaded by

Lewis Cunningham
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views

Debug With PL/SQL

This document discusses how to use SQL Developer to debug PL/SQL code. It covers setting up debugging in SQL Developer, compiling and running code, setting breakpoints and watches, and debugging locally or remotely. The presentation provides an overview of SQL Developer's debugging features and walks through the steps to debug PL/SQL code, from granting permissions to debugging a procedure both locally and remotely.

Uploaded by

Lewis Cunningham
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Debug PL/SQL with SQL Developer

Lewis Cunningham Data Architect, FIS http://it.toolbox.com/blogs/oracle-guide http://databasewisdom.com/


Virtathon 2011 7/17/2011

Introduction
Oracle ACE Director Author Data Architect for FIS Global Twitter: @theRealLewisC Blogger
An Expert's Guide to Oracle Technology
http://it.toolbox.com/blogs/oracle-guide

The Database Geek


http://databasegeek.com

Cloud Computing Info


http://clouddb.info

My Books

Agenda
What SQL Developer offers Setup for debugging Compiling Running Breakpoints, data, watches Remote Debugging

Debugging
Source Level Debugger
Step through code Set break and watch points Smart Data Watch Expressions

Local and Remote Debugging

Setup
Need to grant permissions
DEBUG ANY PROCEDURE DEBUG CONNECT SESSION Must be DBA to do the grants GRANT DEBUG ANY PROCEDURE to HR; GRANT DEBUG CONNECT SESSION to HR;

Compile
Compile code for debug

Run Procedure

Debug Dialog

Debug Log

Set a Break Point

Rerun

It remembers the previous run changes

Breakpoint halts execution

View Breakpoints

View or add breakpoints


Right-click for preferences Conditional breakpoints

Smart Data

View changing data


Right-click for preferences Double click item to change

Data

View all data


Right-click for preferences Double click item to change

Watches

View or add watches

Right-click for preferences

Stack

Stepping

Remote Debugging

Remote debugging means debugging a different session


That session can be on any server or client

You need to know the user name running


You need to attach the client to the server via a debugger listener

Start Remote Debugger

Debugger Listener

Attach Client to Debugger

Need to connect client to debugger

Can be run from a stored procedure

EXEC DBMS_DEBUG_JDWP.CONNECT_TCP( 'localhost', '4000');

Attach Client to Debugger

SQL Dev Accepts connection

Remote Procedure Runs

SQL Dev Ready to Debug

Debug PL/SQL with SQL Developer


Lewis Cunningham Data Architect, FIS http://it.toolbox.com/blogs/oracle-guide http://databasewisdom.com/
Virtathon 2011 7/17/2011

You might also like