Debugging SQL Stored Procedures
In Visual Studio, you can debug a stored procedure from Server Explorer or a source window.
To debug a stored procedure from Server Explorer
- Establish a connection to a database using Server Explorer. For more information, see Server Explorer Window.
- Expand the <database name> node.
- Expand the Stored Procedures node.
- Right-click the stored procedure you want to debug and choose Step Into Stored Procedure from the shortcut menu.
To debug a stored procedure in the text editor
- In a source window, right-click the stored procedure and choose Step Into Stored Procedure from the shortcut menu.
For more information, see Enabling SQL Debugging on SQL 2000 Desktop Engines.
Visual Studio also enables you to debug extended stored procedures. However, you cannot debug SQL statements that are executed outside of a stored procedure.