Debugging Preparation: SQL Server Projects
The SQL Server project template creates the default project settings for debugging. When you choose Start from the Debug menu, these settings cause Visual Studio to compile any common language runtime (CLR) code, deploy code to the SQL Server database, run any T-SQL code, execute a test script, and start the debugger. For more information, see Creating SQL Server 2005 Objects in Managed Code and Debugging SQL Database Objects.
You can also debug SQL Server database objects outside of a SQL Server project. For more information, see T-SQL Database Debugging and SQL CLR Database Debugging.
For information on how to:
Debug a SQL Server project, see Setting Up SQL Debugging.
Debug CLR SQL code, see How to: Enable CLR Debugging For a Connection.
Debug a multi-tier application that accesses a SQL Server database, see How to: Enable Multi-tier Debugging.
To debug a SQL Server Project
Open the project in Visual Studio.
In Solution Explorer, right-click on the project name and choose Properties from the shortcut menu.
In the Project Properties dialog box, open the Configuration Properties node and select Debugging.
In the grid control, set Enable SQLCLR debugging.
Click OK to close the Project Properties dialog box.
From the Debug menu, choose Start.
Debug using the techniques described in Debugging SQL Database Objects.