SQL Debugger.

With SQL Debugger you can execute each line of code step by step and find logical errors. You can set breakpoints, use trace-over and trace-into functions, set breakpoint conditions and use other feature typical for debugger. The input parameters may be entered at the Input Values tab on the bottom of the window. Procedure output is shown at the Output Result Set tab. Execution Statistic tab can be used to check number of selects,inserts,updates or deletes made during the execution of particular statement.
SQL Debugger has tree running modes:

  • Fast - it tries execute all statements directly.  
  • Automatic - first it tries to execute using Fast method and switch to slow if statement failed to execute on Fast.  
  • Slow - It's really slow when you use "Run" or "Run to cursor" command. But any complex statements can be executed.  

These three methods guarantee that you could debug your stored procedure regardless of the statement complexity and server possibilities.