Wednesday, July 2, 2008

TSQL Debugging in SQL 2008

TSQL Debugging is back in SQL Server 2008, along with intellisense  and code outlining, it's a great productivity enhancement. There at least one major difference between the debugging support in SQL 2000 and SQL 2008 that you should probably be aware of, stored procedure debugging. There is no direct way to step into a stored procedure either from the toolbar or the context menu. Debugging then becomes a two step process for stored procedures

  1. Select the procedure and script as execute
  2. Set a breakpoint on the EXEC statement
  3. Select debug from the menu
  4. When the breakpoint is hit, F11 to step into the stored procedure
  5. You can now step through the TSQL in the stored procedure

This is different then the VS 2008 stored procedure debugging support where you can select step into from the context menu. I would have though they would be pretty close in functionality since it appears that they are using much of the VS debugging functionality in SSIS.

1 comment:

p capozzi said...

thanks for the info. Did the trick for sql 2008