如何在Oracle中调试Java存储过程 [英] How to debug Java Stored Procedures in Oracle

查看:118
本文介绍了如何在Oracle中调试Java存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有存储的java程序的Oracle Db,我在这里加载新的程序。



我想能够调试这些java程序,相同的调试方法,例如将App服务器设置为Debug模式。



是可能吗?如何做到这一点?



感谢

解决方案

Oracle JDeveloper支持调试java存储过程。您将需要使用-g选项编译java类,以便在teh类文件中生成调试信息,即

  javac $ JAVA_OPTS -g file_names 

之后,您将需要编写一个虚拟的pl / sql包 - 调用这个java存储过程的过程。然后右键单击pl / sql过程名称并选择Debug。



之后,您可以通过pl / sql和java代码,就像您正在调试一样一个常规的java类。由于您使用-g选项编译了java类,您可以观察变量,评估表达式等。如果不使用-g选项,您仍然可以在调试器中逐步完成代码,但不会可以看到变量/表达式。


I have an Oracle Db with stored java procedures, which I load new procedures here and then.

I would like to be able to debug these java procedures, with a same debug methodology like setting the App server in Debug mode.

is it possible? how can I do that?

Thanks

解决方案

The Oracle JDeveloper has support for debugging java stored procedures. You will need to compile the java classes using the -g option so that the debugging information is generated in teh class files, i.e.

javac $JAVA_OPTS -g file_names

After that, you will need to write a dummy pl/sql package-procedure that invokes this java stored procedure. Then right click on the pl/sql procedure name and select 'Debug'.

After that you can step through the pl/sql and java code just as if you were debugging a regular java class. Since you compiled the java class using the -g option, you can watch variables, evaluate expressions etc. If you didn't use the -g option, you will still be able to step through the code in the debugger, but you will not be able to watch the variables/expressions.

这篇关于如何在Oracle中调试Java存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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