Transact-SQL debugger was deprecated in Microsoft SQL Server Management Studio 18.0 and the functionality is no longer available. SQL Complete delivers one of the most important tools for developers - Debugger - right into SSMS.
T-SQL debugger that integrates with SQL Complete into Microsoft SQL Server Management Studio, is a powerful tool allowing you to observe the run-time behavior of your database objects and locate logic errors. With the debugger, you can break, or suspend, the execution of your program to examine a database object, evaluate and edit variables in your script directly in the IDE.
The integration of SQL Complete into SSMS delivers the Debug menu with access to debugger tools. Debugger windows and dialog boxes display information about your database object and enable you to enter additional information.
The SQL Complete debugger helps you perform the following debugging tasks in a debug mode:
To learn how to configure debugging settings, see Debugging options.
Note
Starting with SSMS version 21, SQL Complete is not added to the menu bar by default. You can manually add it.
To add SQL Complete to the SSMS menu bar:
1. Navigate to Extensions and select Customize Menu.
2. In the Customize > Extensions Menu dialog that opens, clear the checkboxes next to SQL Complete and Debug.
3. Select Save and Restart.
4. In the confirmation dialog, select Yes to apply the changes.
When you attempt to start the Debugger, the following requirements should be fulfilled:
Note
The T-SQL Debugger is not compatible with Microsoft Azure SQL databases. If you want to utilize the SQL Complete Debugger functionality, it is advisable to install SQL Server, including the Express edition, on your local PC. Additionally, you should copy your database from Azure SQL to the local SQL Server and launch debugging on it.
For more information about how to configure the debugger, see Configure the Debugger.
When you start debugging, a toolbar appears allowing you to manage the process of debugging quickly and easily.

Note
It is recommended to debug Transact-SQL code on a test server, not a production one. Debugging sessions may take much time and thus the locks acquired by those sessions may be held for extended periods of time.
Watch the video tutorial to learn how to debug code and scripts using SQL Complete in SSMS.