Another incredibly useful feature of the debugging model found in Visual Studio 2008 is the capability to debug stored procedures in SQL Server databases. You'll need to first check the "Enable SQL Server debugging" setting in the Debug property page of your project, as shown in Figure 45-15. Once activated, whenever your code encounters a stored procedure, you can debug the procedure code inline with your own code.
You can even include breakpoints within a stored procedure so you can trace through the SQL Server code without halting the application code execution.
Your Windows account must be a member of the sysadmin group on SQL Server in order to debug stored procedures.
3.16.139.8