question

BF-2660 avatar image
0 Votes"
BF-2660 asked ErlandSommarskog commented

Debugger permission issue

We have a dev that used to use SSMS in order to debug code that was related to SQL. I guess MS has taken that piece out of SSMS and now they are supposed to do this with Visual Studio. Problem is, now we can't seem to get that to work right.

Each time they try with VS19 to a SQL 2019, the following error comes up:

"Unable to start the Transact-SQL debugger, could not connect to the Database Engine instance '<instance name>'. Make sure you have enabled the debugging firewall exceptions and are using a login that is a member of the sysadmin fixed server role. The RPC server is unavailable."

The firewall is disabled and according to what I have read, the debugging person's account needs to be in the SQL Server's "sysadmin" role. Done that and also made that user the db owner for good measure. FYI, I've tried using domain group and adding them to the group and also just using their individual domain accounts.

Everything I try reaps the same error message.

Please advise.

sql-server-generalsql-server-transact-sql
· 1
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.

Hi @BF-2660,

We have not received a response from you. Did the reply(s) could help you? If the response helped, do "Accept Answer". If it is not work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
BF-2660 avatar image
0 Votes"
BF-2660 answered ErlandSommarskog commented

So I don't know the details what the programmers are doing but when I suggested the Print and Select option, they are aware of that but said that that is too simplistic for what they are doing.

For what ever reason, I had them try again and today it worked!  I didn't make any additional changes.  So the only thing that comes to mind was that maybe some log out and log in process needed to occur after the permissions were set?

Thanks for the feedback

· 1
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.

So I don't know the details what the programmers are doing but when I suggested the Print and Select option, they are aware of that but said that that is too simplistic for what they are doing.

Yeah, had you told me the same 20 years ago, I would have responded in the same manner. But I'm wiser now. :-)

Good to hear that they got it working, but sooner or later they will give up on the debugger and use PRINT/SELECT and be more efficient.

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

The last time I used a debugger with SQL was in 2004 or so. I found that I spent more time of things like the above that I gained in faster resolution of the problem.

And even if it works - you often want to look at tables etc. And it is not a good idea to stop in a the middle of a transaction, there can be blocking issues.

I have found the SELECT and PRINT work very well.

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 @BF-2660,

Transact-SQL debugger is supported in SSMS version 17.9.1 and earlier. You can download SSMS 17.9.1 from here. Then run the SSMS as administrator to run T-SQL debugger.

There are some requirements to start the Transact-SQL debugger, please check the requirements from MS document Run the Transact-SQL Debugger.


If the response is helpful, please click "Accept Answer" and upvote it, thank you.



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.