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:
SQL> show user
USER 为"SCOTT"
SQL> connect system
输入口令:
已连接。
SQL> show user
USER 为"SYSTEM"
SQL> grant DEBUG CONNECT SESSION , DEBUG ANY PROCEDURE to scott;
授权成功。
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.