Oracle调试会话立即退出,针对触发器。

huangapple go评论64阅读模式
英文:

Oracle debug session exits instantly for trigger

问题

我正在尝试调试一个复合触发器。我为调试编译了它,并在触发器上设置了断点,然后点击"调试"。然后它提示我一个PL/SQL块的窗口。我输入了我的SQL语句,然后点击"确定"。

调试会立即结束。

在调试消息窗口中,我收到以下消息:

连接到数据库EFTS。
执行PL/SQL:调用DBMS_DEBUG_JDWP.CONNECT_TCP('127.0.0.1', '6503')
调试器接受了来自端口6503的数据库连接。
执行PL/SQL:调用DBMS_DEBUG_JDWP.DISCONNECT()
进程退出。
从数据库EFTS断开连接。
调试器与数据库断开连接。

奇怪的是,调试器对存储过程有效。我能够逐行跟踪存储过程。但是对于触发器,它会立即结束。

触发器声明:

创建或替代触发器
MySchema.T_EVNTS_UPSERT
用于在MySchema.MyTable上进行插入或更新
复合触发器

SQLDeveloper版本:最新版本

Oracle版本:12c

英文:

I am trying to debug a compound trigger. I compiled it for debug,and put breakpoints on the trigger and hit "debug". Then it prompts me a window for a PL/SQL block. I entered my sql statement, and hit "OK".

The debug session just ends instantly

I got following message in the Debugging Message window:

Connecting to the database EFTS.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '6503' )
Debugger accepted connection from database on port 6503.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.DISCONNECT()
Process exited.
Disconnecting from the database EFTS.
Debugger disconnected from database.

Strangely, the debugger works for stored procedures. I am able to trace through the procedures line by line. However, for TRIGGER, it just ended instantly.

Trigger Declaration:

create or replace TRIGGER 
MySchema.T_EVNTS_UPSERT
FOR INSERT OR UPDATE ON MySchema.MyTable
COMPOUND TRIGGER

SQLDeveloper Version: the latest

Oracle Version: 12c

答案1

得分: 1

请确保您已更改此设置

应该显示为 'Step Into'

还要确保带有断点的PL/SQL行是可执行的代码行,否则它们将被忽略。

英文:

Make sure you have changed this setting

Oracle调试会话立即退出,针对触发器。

It should say instead 'Step Into'

Also ensure the lines of pl/sql with breakpoints are executable lines of code, otherwise they'll be ignored.

huangapple
  • 本文由 发表于 2023年2月9日 01:30:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/75389609.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定