How can I debug an oracle stored procedure from a .net web app?
I have a .net web application that makes heavy use of oracle stored procedures.
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?
What other debugging techniques are there for a .net/Oracle web app?
You can step into pl/sql debugging code from visual studio. (I do it all the time)
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.
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.
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
You can debug your stored procedures with Pl\Sql Developer. That's what i do. :)
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).
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).
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 :
精彩评论