Thursday, 22 March 2007

Visual studio 2005 T-SQL Debugging "Unable to bind SQL breakpoint at this time"

Did you found the "Unable to bind SQL breakpoint at this time" error when debugging pure T-SQL procedures (not CLR)?

Today I discovered a funny 'feature' of the Visual Studio related to T-SQL debugging (hopefully solved in the sp1...):

Accordingly to one of the developers of the Visual Studio Debugger Team, there is an issue with dead connections in Server explorer:

(see http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=840978&SiteID=1&mode=1)

So to be able to step into the procedures from the visual studio, you need to:
a) Delete ALL the connections you may have created
b) Close the Visual Studio
c) Reopen Visual Studio
d) Recreate the connection to the database you want to debug. Make sure credentials you use to connect belong to the sysadmin group of the SQL Server

That's all folks... at least it worked for me.

Anyway... first option is to install SP1 ;o)