Tuesday, February 6, 2007

SQLServer 2005 trigger debugging

They've removed the T-SQL debugger in SQLServer 2005. Luckily I have 1 day left of my Visual Studio 2005 trial.

The way to debug a trigger is to create a stored procedure that exercises the trigger (mine just did an update on the table), set a breakpoint in the trigger where you want, and then step into the *stored procedure* by right clicking on it. Bobs your uncle, VS grinds away and you get to your breakpoint (eventually).

No comments: