SQL Server 2008 T-SQL Debugger

Vendoran · 100K views · 2008 · 4:37

Open on YouTube

Testing, debugging & developer toolsDatabases & storagedemodated

Why Stack Overflow recommends it

Stack Overflow users link it when someone asks how to debug stored procedures or T-SQL scripts without resorting to PRINT statements.

Recommended by 4 people across 4 different months, 2009 to 2017.

What it is

A short screen-capture demo of the Transact-SQL debugger built into SQL Server Management Studio 2008. It shows how to start the debugger from the Query Editor, set breakpoints, step through code and stored procedures, and watch variables.

What people said

Recommends marc_s · 2009-07 · Stack Overflow · on “how to debug sql server queries”

Your case seems to be a simple question of permissions - if you can't even execute your code, you can't debug it. Once you can execute your code and still run into problems, SQL Server 2008 does offer a T-SQL debugger inside SQL Server Management Studio. [LINK] [this video] Quite useful if you need to debug complicated T-SQL script batches or stored procs! Marc

Recommends Arnon Rotem-Gal-Oz · 2011-12 · Stack Overflow · on “Debugging tool in SQL server?”

What's wrong with the TSQL debugger in SQL Server 2008 management studio [LINK] . Also here's a video [this video] showing how to use it

Recommends Hiren Dhaduk · 2013-07 · Stack Overflow · on “how to track the stored procedure execution by using PRINT statements?”

Sql server management studio provide facility to debug the store procedure . by debugging the store procedure you can check value of each variable and which statement executed during execution of the store procedure . just put the debug point in statement in store procedure and press debug . Check [this video]

Recommends Adelphos · 2017-03 · Stack Overflow · on “How to debug stored procedures with print statements?”

Look at this Howto in the MSDN Documentation: Run the Transact-SQL Debugger [LINK] - it's not with PRINT statements, but maybe it helps you anyway to debug your code. This YouTube video: SQL Server 2008 T-SQL Debugger [this video] shows the use of the Debugger. => Stored procedures are written in Transact-SQL [LINK] . This allows you to debug all Transact-SQL code and so it's like debugging in Visual Studio with defining breakpoints and watching the variables. see: debugging T-SQL code: call [LINK] see: debugging T-SQL code: watch variables [LINK]