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.
Add a comment
|
1 Answer
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.
4 Comments
Andrew Rollings
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.
sthay
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.
Andrew Rollings
There are some detailed instructions here: sqlteam.com/article/…
Andrew Rollings
This is also helpful (for an outdated version of VS, but still accurate): support.microsoft.com/kb/316549