SQL Server 2008 Management Improvements – T-SQL Debugger

SQL Server 2008 Management Improvements – T-SQL Debugger

  • Comments 2

I’m here at the SQL Connections conference in April of 2008 and I’m giving a presentation on some of the new Manageability Improvements for SQL Server 2008. In this blog post I’ll talk about the Transact-SQL Debugger tool.

 

Those of you who have been using SQL Server for many years are probably already familiar with this improvement. In fact, you’re one of the reasons it is included in SQL Server 2008. See – we do listen!

 

A “Debugger” is simply a tool that helps you move through your code, line by line, showing you the current state of the variables in the program, an output window where you can observe what the code is doing, error windows, and the ability to navigate backward and forward through each line. The T-SQL debugger we’ve created does just that, and more.

 

You can set “breakpoints”, which means that you can place a mark by a certain line of code, and then tell the debugger to run the code up to that point and then stop.

 

Even if you’re not a hard-core T-SQL developer, you probably do write code from time to time. The De bugger is

included right on the main menu line, so you don’t have to launch anything special to run it. Just type some code (even a system stored procedure like sp_adduser will do) and select the Debugger menu item. The system will show a few more windows, but won’t appear to be doing anything – just click the icon in the icon bar that has the tip-text of “Step into” and watch the screen. Play around with the Step Over features, left-click next to a line of code to set a breakpoint, and generally experiment with the feature. It’s a great way to fix problems, and it’s even a useful way to learn!

Leave a Comment
  • Please add 6 and 8 and type the answer here:
  • Post
  • Hey Buck, I was at this presentation and loved it! One of the best of the conference. I was really anxious to get back home and try out this debugger that I had apparently overlooked somehow. But I still can't find it! I just reinstalled the Feb CTP and just don't have any Debug menu within SSMS. I've typed up some code and still nothing. Does this happen to be a Vista-only feature? I've got another guy in the office here that doesn't have it either. We're both on XP. Any suggestions?

  • <p>Many people have asked where the TSQL debugger is for SQL Server 2005.</p> ...

Page 1 of 1 (2 items)