oracle 如何在 Toad 中调试存储过程?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13722570/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:42:53  来源:igfitidea点击:

How to debug a stored procedure in Toad?

oracledebuggingstored-procedurestoad

提问by Sandeep Kumar

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.

我安装了 Oracle 10g 并且有一个包含多个游标和过程的包,我该如何调试这些过程或游标之一。你能提供步骤吗?我运行了谷歌搜索,但没有找到任何说明如何从包中调试特定程序的内容。

回答by Gaurav Soni

Basic Steps to Debug a Procedure in Toad

在 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.
  1. 在 Toad Editor 中加载您的程序。
  2. 将调试点放在要调试的行上。请参阅第一个屏幕截图。
  3. 右键单击编辑器 Execute->Execute PLSQL(Debugger)。查看第二个截图。
  4. 将打开一个窗口,您需要从左侧选择程序并为该程序传递参数,然后单击执行。参见第三个屏幕截图。
  5. 现在开始您的调试检查 Debug-->Step Over...Add Watch 等。

Reference:Toad Debugger

参考:Toad 调试器

Debug

调试

Execute In Debug

在调试中执行

parameter

范围

回答by Nikhil Reddy

Open a PL/SQL object in the Editor.

在编辑器中打开一个 PL/SQL 对象。

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

在 Execute 工具栏上选择以下选项之一开始调试: Execute PL/SQL with debugger () Step over Step into Run to cursor