- Yes, although it can be tricky to get debugging working, especially if trying to debug SQL on a remote SQL server from your own development machine.
- In the first instance I'd recommend getting this working by debugging directly on the server first, if possible.
- Log to the SQL server using an account that has sysadmin rights, or ask your DBA to to do this.
- Then, for your own Windows account, create a 'login' in SQL Server, if it isn't already there:

- Right-click the account > properties - ensure that the login is a member of the 'sysadmin' role:

- (also ensure that the account is 'owner' of any databases that you want to debug scripts (e.g. stored procs) for:

- Then, login directly onto the SQL server using your Windows account.
- Login to SQL server using Windows Authentication (using the account you've just used to log into the server)
- Now 'Debug' the query in SQL management studio, setting breakpoints as necessary. You can step into stored procs using F11:

- Here's a useful guide to debugging:
http://blogs.msdn.com/b/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-1.aspx
- If you need to remotely debug, then once you've got this part working, you can try setting up remote debugging:
http://blogs.msdn.com/b/billramo/archive/2009/04/11/transact-sql-debugger-for-sql-server-2008-part-2.aspx