问题
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.
回答1:
Basic Steps to Debug a Procedure in Toad
- Load your Procedure in Toad Editor.
- Put debug point on the line where you want to debug.See the first screenshot.
- Right click on the editor Execute->Execute PLSQL(Debugger).See the second screeshot.
- 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.
- Now start your debugging check Debug-->Step Over...Add Watch etc.
Reference:Toad Debugger
回答2:
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
来源:https://stackoverflow.com/questions/13722570/how-to-debug-a-stored-procedure-in-toad