question

Xarzu avatar image
0 Votes"
Xarzu asked TomPhillips-1744 answered

How is remote debugging allowed on Microsoft SQL Management studio?

This is working with Sql Server version 2008 R2

Here are the other versions of software that might be helpful:

https://www.sqlservercentral.com/wp-content/uploads/hm_bbpui/3924844/dtrwhu4y2axnms3w5lvemj1q0byz1z42.png

How is remote debugging allowed on Microsoft SQL Management studio?

This question might be misunderstood. I am not sitting at the computer where Microsoft SQL Managment studio resides and I am attempting to debug a remote database. That is not the issue I am having at all. Instead, I have remoted into a client's server by their request and also I am trying to debug an issue they are having. You see, this is how things are evolving in our world. More and more there are situations where a developer is working from home and has to remote into a client's system do get some work done.

When I open up their studio software on their side, if I try to debug or execute a command, I get this error message:

https://i.stack.imgur.com/5kprj.png

I want to be able to instruct them, on their side, what they need to do to make this problem go away. Please advise.


sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered

As Erland said, ignore the option and just run your TSQL in the query window.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered

Hi @Xarzu,

To run the Transact-SQL debugger when connected to a remote instance of the Database Engine, program and port rules in the Windows Firewall must be enabled on both computers. There are also some requirements for Starting the Debugger.

Please refer to below MS documents to get detail information.

Configure firewall rules before running the TSQL Debugger
Configuring the Transact-SQL Debugger


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

I gave up on the debugger many years ago. I found that I spent more time to get it working than I gained from using it.

Generally, it works with your local instance. Less so if SQL Server runs on a different machine. There are firewall ports that needs to be opened, including the rpc port, and that's not one to open if you think the firewall actually serves a purpose. And that firewall port is only the start of it.

What I do to debug my SQL code? Debug PRINT and SELECT. Occasionally I also use sp_sqltrace.

I also like to point that running the debugger against a production environment is definitely not appropriate, as you could be holding locks for a longer time that is suitable when you single-step through a procedure.

Finally, in the more recent cadence of SSMS, SSMS 18, the debugger is gone.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.