I prefer to simply use stored procs to retrieve data and do any complex "work" on the application side. Because you're right, trying to "debug" what happens inside the gut of a multilayer, cursor loop, temp-table using a nested stored procedure is very difficult.
However, MS KB 316549 describes how to use visual studio to debug stored procedures.
In accordance with this article, there are a number of limitations for debugging as follows:
- You cannot break execution.
- You cannot edit and continue.
- You cannot change the order in which instructions are executed.
- Although you can change the value of variables, your changes may not take effect, since the values ββof the variables are cached.
- The output from the SQL PRINT statement is not displayed.
Change Obviously, if you are the person who runs this stored process, then do not make it a "multi-level, course loop, temp-table using and inested". In my role, DBA, however, is what I meet daily with application developers.
Bradc
source share