How to: Enable Multi-tier Debugging
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

How to: Enable Multi-tier Debugging

This topic applies to:


Visual Basic



Web Developer


Topic does not applyTopic does not applyTopic does not applyTopic does not apply


Topic does not applyTopic does not applyTopic does not applyTopic does not apply

Pro and Team

Topic appliesTopic appliesTopic appliesTopic applies

Table legend:

Topic applies


Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

The following procedure describes how to enable multi-tier debugging for a SQL Server instance. These steps are not needed if you are only debugging on the database tier.

When you specify multi-tier debugging, you are specifying the credentials to use in connecting to databases from application code.

Server Explorer may contain multiple connections to one instance of SQL Server 2005. These connections may correspond to different databases, or to different credentials for the same database. Examples of different credentials include:

  • Windows Authentication logon ID.

  • One or more SQL Server Authentication user IDs.

To initialize an instance of SQL Server 2005 for multi-tier debugging, you choose one of those credentials by choosing a connection. When you enable multi-tier debugging for one connection, the entire server is enabled for debugging. If you enable multi-tier debugging on a connection that uses Windows Authentication, the credentials associated with the connection restrict which databases you can debug.

If no connection has been enabled for multi-tier debugging, or if the credentials are not sufficient for debugging, breakpoints set in SQL Server objects on the corresponding server will not be hit.

To debug SQL CLR database objects, you must have enabled CLR debugging for the selected database connection. For more information, see How to: Enable CLR Debugging For a Connection.

Setting a breakpoint in a SQL CLR object automatically enables the corresponding server for SQL CLR debugging. Setting a breakpoint in a T-SQL or SQL CLR object automatically enables the server for multi-tier application debugging, if it is possible. Enabling the server for multi-tier debugging may not be possible if you do not have a connection with Windows Authentication.

To successfully debug multi-tier applications, you must have enabled debugging for the application project. For more information, see How to: Enable SQL Debugging For a Project.

Once you have started debugging, it is too late to change settings in Server Explorer. Changes made in Server Explorer will not take effect until the start of the next debugging session.


If you have connection pooling enabled, you must temporarily disable it while debugging. For more information, see SQL Debugging Limitations.


The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To enable multi-tier debugging

  1. Open Server Explorer.

  2. Click a database connection to select it.

  3. Right-click the connection you want to debug, and on the shortcut menu, click Application debugging.

© 2016 Microsoft