Error: Transact-SQL execution ended without debugging

This error occurs when you're trying to debug a Transact-SQL or SQLCLR procedure and the debugger doesn't receive debugging messages from the SQL Server.

This issue could be because of 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 account isn't 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 a sysadmin.

    If you're using a SQL account name like sa, the application account must be set up on the SQL Server as a sysadmin. By default, administrators on the machine that SQL server is running on are SQL Server sysadmins.

    To correct this error, you might need to:

See also