Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Transact-SQL Debugger

Transact-SQL Debugger

SQL Server 2000

The Transact-SQL Debugger window displays the text of the stored procedure to be debugged and provides the following debugging options.

Option Description
Go Runs the stored procedure in debugging mode.
Toggle Breakpoint Sets or removes a breakpoint at the current line. You cannot set a breakpoint on lines containing nonexecutable code such as comments, declaration statements, or blank lines.
Remove All Breakpoints Clears all breakpoints in your code.
Step Into Executes one code statement at a time. Step Into executes the statement at the current execution point. If the statement is a call to a procedure, the next statement displayed is the first statement in the procedure.
Step Over Executes one code statement at a time. If the current statement contains a call to a procedure, Step Over executes the procedure as a unit, and then steps to the next statement in the current procedure. Therefore, the next statement displayed is the next statement in the current procedure regardless of whether the current statement is a call to another procedure.
Step Out Executes the remaining lines of a function in which the current execution point lies. The next statement displayed is the statement following the procedure call. All of the code is executed between the current and the final execution points.
Run to Cursor Specifies a statement further down in your code where you want execution to stop. Use this option to avoid stepping through large loops.
Restart Restarts execution from the beginning of the stored procedure.
Stop Debugging Halts debugging.
Callstack Lists the procedures calls that have started but are not completed.
Auto Rollback Automatically rolls back all work performed during execution of the procedure.

The code pane displays the SQL statement you are debugging. Separate output panes are provided for local and global variables, for the result set of the query, and for the call stack. Note that global variable is a legacy term for the Transact-SQL built-in functions whose names start with @@.

© 2015 Microsoft