1

I installed SSMS 19 Preview 4 and it doesn't have a Debug Menu or Debugging option. I also learnt that SSMS V17 was the last version with that capability. Then I decided to try Azure Data Studio, but still not able to see debug option. Can someone direct me how I can debug an SP using Azure Data Studio IDE?

2
  • FWIW, theoretically it's possible to use the Visual Studio debugger nowadays, but requires a little setup. Here is the feature being voted on to be added back into SSMS. Feel free to cast your vote and maybe Microsoft will listen one day.
    – J.D.
    Jan 20, 2023 at 13:37
  • 1
    @J.D. Definitely would give this a try, and yeah let's hope Microsoft would listen :-)
    – TmzGOAT
    Jan 21, 2023 at 11:25

2 Answers 2

0

This feature is not available. There are other ways to do, but they aren't very user friendly.

https://www.brentozar.com/archive/2023/01/3-ways-to-debug-t-sql-code/

Short summary:

Developers are used to their tools having built-in ways to show what line of code is running now, output the current content of variables, echo back progress messages, etc. For a while, SQL Server Management Studio also had a debugger, but it was taken out of SSMS v18 and newer versions. Even when it was around, though, I wasn’t a big fan: SQL Server would literally stop processing while it stepped through your query. This was disastrous if your query was holding out locks that stopped other peoples’ queries from moving forward – and you just know people were using it in production.

  • Option 1: Use PRINT statements.
  • Option 2: Use RAISERROR
  • Option 3: Use Table Variables.

However in all cases you have to edit your code.

1
  • 1
    I appreciate the insight! I was hoping Azure Data Studio would be much feature rich and able to do many things including debugging; However, I will totally follow your method going forward cause you picked up valid points! Cheers :-)
    – TmzGOAT
    Jan 19, 2023 at 16:26
-1

I suggest you to download SSMS 17.9.1 since this version has a debug option right next to the run button. You can donwload it from the link bellow.

https://go.microsoft.com/fwlink/?linkid=2043154&clcid=0x409

1
  • Can't use SSMS v17.x on higher version of SQL server
    – hoggar
    Dec 3, 2023 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.