如何从。net web应用程序调试oracle存储过程?

时间:2021-10-26 22:35:42

I have a .net web application that makes heavy use of oracle stored procedures.

我有一个。net web应用程序,它大量使用oracle存储过程。

One of these is problematic - some times it works, some times it doesn't.

其中之一是有问题的,有时有用,有时没用。

Is there any way to either attach a debugger to oracle when the sp is called, or step into it directly from Visual Studio?

当sp被调用,或者直接从Visual Studio进入oracle时,是否有方法将调试器附加到oracle中?

What other debugging techniques are there for a .net/Oracle web app?

对于.net/Oracle web应用程序,还有什么其他调试技术吗?

3 个解决方案

#1


7  

You can step into pl/sql debugging code from visual studio. (I do it all the time)

您可以从visual studio进入pl/sql调试代码。(我一直这么做)

You will need to use the Oracle Developer Tools (http://www.oracle.com/technology/tech/windows/odpnet/index.html) from Oracle but here is their walk-through that should get you up and running.

您将需要使用Oracle的开发工具(http://www.oracle.com/technology/tech/windows/odpnet/index.html),但是下面是他们的演练,它们将帮助您启动和运行。

http://www.oracle.com/technology/oramag/oracle/06-sep/o56odp.html

http://www.oracle.com/technology/oramag/oracle/06-sep/o56odp.html

it takes a little set up, but once it is working you can debug directly from .net into Oracle code.

它需要一些设置,但是一旦它开始工作,您可以直接从。net调试到Oracle代码。

Here is Christian Shay's walk-through (he's the Product Manager in the .NET and Windows group at Oracle) http://cshay.blogspot.com/2006/07/plsql-debugger-in-visual-studio.html

以下是克里斯蒂安•谢伊(Christian Shay)的演练(他是Oracle的。net和Windows团队的产品经理)http://cshay.blogspot.com/2006/07/plsql-debugger-in- visualstudioo.html

#2


1  

You can debug your stored procedures with Pl\Sql Developer. That's what i do. :)

您可以使用Pl\Sql开发人员调试您的存储过程。这就是我做的。:)

I don't think you'll be able to debug the Oracle SP from the .net code (or at least im not familiar with the technique).

我认为您无法从。net代码中调试Oracle SP(或者至少我不熟悉这种技术)。

And by the way, If you have a lot of code logic in your stored procedures, then maybe you should think about moving it out to your code base (At least if speed isn't a very crucial aspect in your application).

顺便说一下,如果您的存储过程中有很多代码逻辑,那么也许您应该考虑将它移到代码库中(至少如果速度在应用程序中不是非常重要的方面)。

#3


0  

You can't step into pl/sql code from visual studio using debugger. If you need to debug the stored procedure you must have access to its body and you can use PL/SQL Developer for that. Of course there is technique with using DBMS_DEBUG, but I think with PL/SQL Developer will be much easier, it looks like this : 如何从。net web应用程序调试oracle存储过程?

您不能使用调试器从visual studio进入pl/sql代码。如果需要调试存储过程,则必须能够访问它的主体,并且可以使用PL/SQL Developer进行调试。当然有使用DBMS_DEBUG的技术,但是我认为使用PL/SQL Developer会更简单,看起来是这样的:

#1


7  

You can step into pl/sql debugging code from visual studio. (I do it all the time)

您可以从visual studio进入pl/sql调试代码。(我一直这么做)

You will need to use the Oracle Developer Tools (http://www.oracle.com/technology/tech/windows/odpnet/index.html) from Oracle but here is their walk-through that should get you up and running.

您将需要使用Oracle的开发工具(http://www.oracle.com/technology/tech/windows/odpnet/index.html),但是下面是他们的演练,它们将帮助您启动和运行。

http://www.oracle.com/technology/oramag/oracle/06-sep/o56odp.html

http://www.oracle.com/technology/oramag/oracle/06-sep/o56odp.html

it takes a little set up, but once it is working you can debug directly from .net into Oracle code.

它需要一些设置,但是一旦它开始工作,您可以直接从。net调试到Oracle代码。

Here is Christian Shay's walk-through (he's the Product Manager in the .NET and Windows group at Oracle) http://cshay.blogspot.com/2006/07/plsql-debugger-in-visual-studio.html

以下是克里斯蒂安•谢伊(Christian Shay)的演练(他是Oracle的。net和Windows团队的产品经理)http://cshay.blogspot.com/2006/07/plsql-debugger-in- visualstudioo.html

#2


1  

You can debug your stored procedures with Pl\Sql Developer. That's what i do. :)

您可以使用Pl\Sql开发人员调试您的存储过程。这就是我做的。:)

I don't think you'll be able to debug the Oracle SP from the .net code (or at least im not familiar with the technique).

我认为您无法从。net代码中调试Oracle SP(或者至少我不熟悉这种技术)。

And by the way, If you have a lot of code logic in your stored procedures, then maybe you should think about moving it out to your code base (At least if speed isn't a very crucial aspect in your application).

顺便说一下,如果您的存储过程中有很多代码逻辑,那么也许您应该考虑将它移到代码库中(至少如果速度在应用程序中不是非常重要的方面)。

#3


0  

You can't step into pl/sql code from visual studio using debugger. If you need to debug the stored procedure you must have access to its body and you can use PL/SQL Developer for that. Of course there is technique with using DBMS_DEBUG, but I think with PL/SQL Developer will be much easier, it looks like this : 如何从。net web应用程序调试oracle存储过程?

您不能使用调试器从visual studio进入pl/sql代码。如果需要调试存储过程,则必须能够访问它的主体,并且可以使用PL/SQL Developer进行调试。当然有使用DBMS_DEBUG的技术,但是我认为使用PL/SQL Developer会更简单,看起来是这样的: