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.
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.
You can debug the SQL Server stored procedure and scripts with Visual Studio.NET,
Open the Visual Studio.NET and click the continue without code (link)
Connect to SQLServer in Visual Studio.NET. Menu Tools->SQL Server->New Query
Enter Sql Server Connection Data
In script note write your script or Invoke the Stored procedure or User define function
F9 or double click left of code line for out the break point
In menu SQL-> Execute with debugger
with F11 trace line By line
Complete
Sometimes you can debug using and older version of SSMS (like 2014) that still has the debug feature build in. I haven't tested though for what newer SQL Server versions this still works. I'm having problem using Visual Studio for debugging if there are nested stored procedures. It starts asking for the source-code when it returns to the caller procedure. So unfortunately they took away debugging and in return we got an alternative that has bugs.
© 2022 - 2024 — McMap. All rights reserved.