Oracle debug stored procedure

A key step in debugging
1. Right-click the stored procedure to be debugged and select Edit to debug. The screenshot is as follows:


 
2. Click on the little ladybug, and the debugging window will pop up. The screenshot is as follows:


 
3. Enter the 7839 employee number, click OK to debug, the screenshot is as follows:


 
4. The screenshot shows that the permissions are not enough, and the permissions of the scott user need to be added.
5. Add the permission statement as follows:
  1. SQL> show user
  2. USER "SCOTT"
  3. SQL> connect system
  4. 输入口令:
  5. 已连接。
  6. SQL> show user
  7. USER "SYSTEM"
  8. SQL> grant DEBUG CONNECT SESSION , DEBUG ANY PROCEDURE to scott;
  9. 授权成功。
6. Debug again, the program stays at the breakpoint position, the screenshot is as follows:


 
7. If you want to view the value of psal, you can right-click the variable and select "Monitor" to view the value.
8. F8 is the single-step operation of the program.
9. Click the red box on the toolbar to end debugging.
 
Two matters needing attention
It is recommended to use local debugging, not remote debugging.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326123246&siteId=291194637
Recommended