Why Aren't My Breakpoints Hitting Sql In Visual Studio 2019 Debugging Script From Network Server
Solution 1:
Download and Install a version of SSMS < version 18. Then you will be able to debug.
Solution 2:
I have my database on another system and I want to debug remotely using visual studio 2019. Setting up a connection works to the database but debugging a stored procedure does not work. I get a message box indicating 'Unable to start the Transact-SQL debugger, could not connect to the Database Engine instance 'servername\instancename'. Make sure you have enabled the debugging firewall exceptions and are using a login that is a member of the sysadmin fixed server role. Click Help for more information. The user that I am using has sysadmin role, checked it using the 'SELECT IS_SRVROLEMEMBER('sysadmin', 'YourLogin') command. I have disable the firewall on the remote machine. Locally I have enabled port 1433, 1434 and 135. Unfortunately this does not resolves the issue.
Solution 3:
I had the same problem and then remembered reading about Debugging firewall ports when I installed SQLServer 2019.
With SS 2014 I didn't get any error messages but when I tried to debug with SS2019 it said possible firewall block.
Solution 4:
Why aren't my breakpoints hitting SQL In Visual Studio 2019 debugging script from network server
According to your issue, you can try to follow my steps:
One
1) connect the database in SQL Server Explorer and make sure you can access the data successfully.
2) right-click on the selected procedure and choose Execute Procedure Option. Then it will open a new query window where you can execute your stored procedure as shown below.
An easy way is that you can just choose Debug Procedure, it will debug your procedure directly and you should not follow the below steps.
3) set a new breakpoint in the query file and select Execute with Debugger.Since you cannot open the green arrow's drop-down box, you can select the menu on the top bySQL-->Execute with Debugger to debug your procedure.
Besides, please remember to select the right database before debugging so that you don't run debug statements against other databases.
Note: If your stored procedure requires parameters as input, Visual Studio will prompt you to enter the values before opening the new query window.
More info you can refer to this.
Two
1) Right-click on the Project in the Solution Explorer-->Add--> Script-->Script(Not in Build).
2) Write a custom query to select your procedure like exec dbo.Users_GetUserInfo and then choose SQL-->Execute with Debugger.
Hope it could help you.
Post a Comment for "Why Aren't My Breakpoints Hitting Sql In Visual Studio 2019 Debugging Script From Network Server"