Using the Transact-SQL Debugger
The Transact-SQL debugger in SQL Server Management Studio enables you to find errors in Transact-SQL scripts, stored procedures, triggers, and functions by observing their run-time behavior. You can start the debugger when you are using the Database Engine Query Editor window. By using the Transact-SQL debugger, you can do the following:
- Step through the Transact-SQL statements in the editor line by line, or set breakpoints to stop at specific lines. 
- Step into or over Transact-SQL stored procedures, functions, or triggers that are run by the code in the editor window. 
- Watch the values that are assigned to variables, and observe system objects such as the call stack and threads. 
In This Section
- Transact-SQL Debugger Fundamentals 
 Describes the functionality and the user-interface of the Transact-SQL debugger in Management Studio.
- Configuring and Starting the Transact-SQL Debugger 
 Describes how to configure and start the Transact-SQL debugger.
- Stepping Through Transact-SQL Code 
 Describes how to use the Transact-SQL debugger to step through code.
- Viewing Transact-SQL Debugger Information 
 Describes how to use the debugger to view Transact-SQL data, such as parameters and variables, and system information.