How to debug a stored procedure in Toad?
Asked Answered
O

2

23

I have Oracle 10g installed and there is a package which has a number of cursors and procedures, how do I debug one of these procedures or cursors. Can you please provide steps for that? I ran a Google search but did not find anything specifying how to debug a particular procedure from a package.

Otte answered 5/12, 2012 at 11:46 Comment(2)
Good video with slightly different approach: youtube.com/watch?v=7HCInbar5_oHadj
Any hints on how to keep breakpoints between Toad restarts?Acid
C
31

Basic Steps to Debug a Procedure in Toad

  1. Load your Procedure in Toad Editor.
  2. Put debug point on the line where you want to debug.See the first screenshot.
  3. Right click on the editor Execute->Execute PLSQL(Debugger).See the second screeshot.
  4. A window opens up,you need to select the procedure from the left side and pass parameters for that procedure and then click Execute.See the third screenshot.
  5. Now start your debugging check Debug-->Step Over...Add Watch etc.

Reference:Toad Debugger

Debug

Execute In Debug

parameter

Cyclades answered 5/12, 2012 at 13:1 Comment(3)
And don't forget to give the necessary grant to your user.Once upon a time i lost 3 hours to this."grant DEBUG CONNECT SESSION to your_user;"Aleen
Thanks Works well :DDebouch
it hangs for a minute....Antony
P
1

Open a PL/SQL object in the Editor.

Click on the main toolbar or select Session | Toggle Compiling with Debug. This enables debugging.

Compile the object on the database.

Select one of the following options on the Execute toolbar to begin debugging: Execute PL/SQL with debugger () Step over Step into Run to cursor

Petrochemical answered 17/9, 2015 at 15:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.