Is there any possibility to directly dive into SQL Server stored procedures from .net code?
So when debugging step by step in .net, I'd like to step into a called stored procedure.
I know how to debug them individually, but I'd like to join these debug sessions in order to gain some time.
views:
343answers:
1
+4
A:
I've always found this a little tricky, but it is possible.
First you have to enable T-SQL debugging in the IDE for the project/solution, then you have to set up the database connection as part of the project/solution.
Actually stepping into a stored procedure appears to be troublesome, but if you open the stored procedure code and explicitly set a breakpoint in there, it will hit the breakpoint.
Andrew Rollings
2008-12-12 15:44:58
Does this only work if you are using a Database project?
sestocker
2008-12-12 16:32:52
I'm not sure. It's been a while since I've done it. I know that you have to have the connection set up as part of the solution.
Andrew Rollings
2008-12-12 16:37:45
how do you set up the connection to be part of the solution? when I put a breakpoint on the stored procedure, it says No symbols were loaded.
sthay
2008-12-12 16:42:00
There are some detailed instructions here:http://www.sqlteam.com/article/debugging-stored-procedures-in-visual-studio-2005
Andrew Rollings
2008-12-12 17:17:33
This is also helpful (for an outdated version of VS, but still accurate): http://support.microsoft.com/kb/316549
Andrew Rollings
2008-12-12 17:19:42