views:

52

answers:

3

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?

A: 

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).

gillyb
A: 

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 : alt text

Incognito
Oracle's free SQL Developer has the debugger too.http://www.oracle.com/technology/software/products/sql/index.html
Gary
+4  A: 

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

tanging