In versions prior to SQL Server 2008 I primarily used SELECT/PRINT
statements to debug. But SQL Server 2008 added back the T-SQL debugger
(which was available in SQL Server 2000) and it is improved a lot.
Recently had to debug a client SP that was 3000+ lines of code, and the
SQL Server 2008 debugger was great.
Also, Visual Studio 2005 has debugging functions for SQL Server 2005.
Here is one article on the topic:
http://aspnet.4guysfromrolla.com/articles/051607-1.aspx
--
Plamen Ratchev
http://www.SQLStudio.com >> Stay informed about: Debugging Stored Procs