There are a few requirements that you need to meet to use SQL Server 2008’s T-SQL debugger. First, you need to be aware that T-SQL debugging has both client and server components, which means you can debug only T-SQL code that’s running on SQL Server 2008 systems. Next, SSMS must be running under a Windows account that’s a member of the sysadmin fixed server role.
If you’re debugging T-SQL on a remote SQL Server 2008 system, you need to make sure that TCP port 135 is open. In addition, if the domain policy requires IPsec for network communications, UDP port 4500 and UDP port 500 must also be available.