Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging SQL in SSMS v18.0+

I've just installed SSMS v18.6 and surprisingly I noticed that there's no debug menu anymore! I'm very dependent on debugging my SQL scripts like stored procs. Can anyone explain how I can achieve this? Any help would be much appreciated.

like image 590
Mathew Sok Avatar asked Dec 15 '25 05:12

Mathew Sok


2 Answers

Debugging capabilities are no longer available in SSMS v18.0 onwards. I guess it's not been in high demand and also because of the overload it has imposed on the software. If you still need to debug your SQL scripts you can do it by using Visual Studio. There is a good video at How to debug SQL code showing you how to achieve your goal.

like image 168
Roozbeh Y Shad Avatar answered Dec 16 '25 22:12

Roozbeh Y Shad


You can debug the SQL Server stored procedure and scripts with Visual Studio.NET,

  1. Open the Visual Studio.NET and click the continue without code (link)

  2. Connect to SQLServer in Visual Studio.NET. Menu Tools->SQL Server->New Query

  3. Enter Sql Server Connection Data

  4. In script note write your script or Invoke the Stored procedure or User define function

  5. F9 or double click left of code line for out the break point

  6. In menu SQL-> Execute with debugger

  7. with F11 trace line By line

  8. Complete

enter image description here

like image 29
Mehdi Hassani Goodarzi Avatar answered Dec 16 '25 21:12

Mehdi Hassani Goodarzi