|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Error: T-SQL execution ended without debugging
This error occurs when you are trying to debug a T-SQL or SQLCLR procedure and the debugger does not receive debugging messages from the SQL Server.
This could be due to network problems or to problems on the SQL Server, but the most likely cause is a permissions problem.
There are two accounts involved:
The application account is the user account that Visual Studio is running as.
The connection account is the identity used to make the connection to SQL Server. This is not necessarily the same as the identity that Visual Studio is running as if the connection is using SQL authentication.
SQL debugging requires that the application account must match the connection account or be sysadmin.
If you are using a SQL login like sa, the application account must be setup on the SQL Server as a sysadmin. By default, administrators on the machine SQL server is running on are SQL Server sysadmins.
To correct this error, you might need to:
Verify your permissions settings. For more information, see.
Make sure SQL debugging if set up correctly.
Consult with your network or database administrator.