Guys, by far the easiest method of debugging stored procedures is to spend the time getting the debugger working for you. Yes, it's sometimes frustrating to get it up and running, but with a bit of patience you will be richly rewarded because *nothing* beats being able to step through your proc, setting breakpoints, and checking variable values on the fly.
If debugging isn't working on your server, here's
a good MSDN article to start you off.
You can also find a lot of info about this topic by searching for "Debugging stored procedures" in the newsgroup microsoft.public.dotnet.framework.adonet which is accessible through Google Groups.
I found this afternoon that there were two problems that were preventing my server from letting me do interactive debugging:
Firstly, using dcomcnfg (start...run...dcomcnfg), select "SQL Debugger Registry2" in the applications tab. Click properties, select the Identity tab, and then select "The Interactive User" as the account to run this application. Click ok, and click ok again to save this setting. Restart the SQL Server service.
At the very least this will provide you with a more meaningful error message if the debugger still won't start. Check the articles above for keywords from your error message and follow the advice. It will work eventually!
The second and crucial problem that I found was that my server had been renamed at some point. This is a known problem with the debugger and is covered in
MSDN knowledge base article 317241.
To quickly check if your server has been renamed, type SELECT @@SERVERNAME into Query Analyzer. If you don't get the server name you expect then you may have a renamed server on your hands. See the article above for further instructions.
I hope this helps.
I also hope that Microsoft make SQL debugging an altogether easier experience in Yukon!
Rob C-W