plsql远程调试断点不起作用 [英] plsql remote debug breakpoints not working

查看:584
本文介绍了plsql远程调试断点不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调试pl sql代码时遇到了奇怪的情况.

I have a weird situation with debugging pl sql code.

我将sql开发人员设置为侦听调试连接.在Java代码中,我使用以下代码附加调试器:

I set sql developer to listen for debug connections. In java code I attach debugger with following code:

CallableStatement cstmt = null;
                try {
                    cstmt = getConnection().prepareCall("begin DBMS_DEBUG_JDWP.CONNECT_TCP( '10.1.1.17', 4000); end;");
                    cstmt.execute();
                } catch (SQLException e) {
                    e.printStackTrace();
                } finally {
                    closeStatement(cstmt);
                }

调试器成功连接,即我可以在Run Manager的sql developer中看到该连接存在.

Debugger connects successfully, i.e. I can see in sql developer in Run Manager that connection exists.

尽管创建了连接,但是调试器无法正常工作.有时断点未打上绿色标记,有时却打勾,但断点仍然不起作用.无论如何,调试器不会在中断时停止,被成功调用的过程就像没有中断一样.

Despite connection is created debugger does not work. Sometimes breakpoints are not ticked with a green mark, sometimes they are, but breakpoints still do not work. In any case debugger does not stop on breaks, procedures that are called successfully executed as if there are not breaks.

我在其中放置中断的程序包已编译以进行调试,Start Debugger Option设置为Step Over.我还尝试以相同的行为Sql Developer 3.2.2和3.0.6、3.0.4.我从'Sql Developer'和应用程序使用的用户是相同的,并且该用户具有调试特权(DEBUG CONNECT SESSIONDEBUG ANY PROCEDURE).我没有办法使它工作.

Packages where I put breaks are compiled for debug, Start Debugger Option is set to Step Over. I also tried to Sql Developer 3.2.2 and 3.0.6, 3.0.4 with the same behaviour. User which I use from 'Sql Developer' and from application are the same and this user has debug privileges (DEBUG CONNECT SESSION, DEBUG ANY PROCEDURE). I am run out of ideas how to make it work.

接下来要尝试什么,如何诊断此问题?

What to try next, how to diagnose this problem?

推荐答案

我发现了根本问题.它与oracle无关,而与应用程序服务器和数据库连接有关.我将调试器附加到一个bean中,并在另一个bean中调用plsql过程.因为他们在同一笔交易中,所以我认为应该共享连接,但事实并非如此.因此,我只是将调试器附件移到了调用过程的bean上,现在可以正常使用了.

I found root issue. It is not about oracle, it is about application server and connection to database. I was attaching debugger in one bean and calling plsql procedures in other bean. As they were in the same transaction I thought that connection should be shared, but it did not. So I just moved debugger attachment to bean where procedures were called and now it works finely.

这篇关于plsql远程调试断点不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆