Does SQL Server 2008 have a built in debugger? I've got a stored procedure that returns an error if it is fed a string of alphabetic characters (as opposed to numeric) and I'd like to be able to determine what line it gets to before returning an error.
A:
I would add PRINT 'Checkpoint A passed' type statements at various points to see how far it gets.. the output would appear on the Messages tab. It's a lame way of debugging, but it works.
insert into blah blah blah
print 'Passed the insert'
select blah
print 'Passed the select'
Fosco
2010-07-22 14:48:33
+1
A:
SQL Server Management Studio can debug stored procedures in SQL Server 2008. Open your stored procedure, and instead of hitting the "execute" button (the red exclamation mark) hit the "debug" button (the green "play" arrow).
Matt Ball
2010-07-22 14:52:21
+2
A:
Yes, you can debug SQL stored procedures, functions, triggers, etc.
Rick D
2010-07-22 14:54:41
+1
A:
You can try the Transact SQL Debugger I've never used it but remember reading about it somewhere.
TooFat
2010-07-22 14:58:20