Partager via


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:

To debug a SQL Server Project

  1. Open the project in Visual Studio.

  2. In Solution Explorer, right-click on the project name and choose Properties from the shortcut menu.

  3. In the Project Properties dialog box, open the Configuration Properties node and select Debugging.

  4. In the grid control, set Enable SQLCLR debugging.

  5. Click OK to close the Project Properties dialog box.

  6. From the Debug menu, choose Start.

  7. Debug using the techniques described in Debugging SQL Database Objects.

See Also

Concepts

Debugging SQL

Other Resources

Setting Up SQL Debugging