How to manage the Debugger

Last modified: December 30, 2022

You can manage the Transact-SQL Debugger that comes with SQL Complete with the help of menu commands, the Debugger toolbar, operation windows, and shortcuts.

Step through Transact-SQL code

You can control which statements are run with the Debugger. One of the most common debugging operations is stepping through code. It means executing one line of code at a time.

The Debug menu provides the following commands for stepping through code:

  • Step Into
  • Step Over
  • Step Out

Breakpoints

Breakpoints signal the Debugger to pause execution on a specific Transact-SQL statement. When the Debugger reaches a statement with a breakpoint, it pauses execution so you can view debugging information, such as variables values, and parameters.

Step Into

If the next statement invokes a Transact-SQL stored procedure, function, or trigger, the Debugger opens a new Query Editor window that is already in the debug mode. You can move through that procedure, function, or trigger code, for example, by setting breakpoints or stepping through the code.

Step Over

If the statement invokes a stored procedure, function, or trigger, Step Over executes that and then halts at the first line outside the function. Use Step Over if you are sure there are no errors in the procedure, function, or trigger code and you want to avoid stepping into it.

Step Out

Use Step Out if you are inside a stored procedure, function, or trigger and want to return to the main debugging window. Execution pauses on the statement that follows the call to the stored procedure, function, or trigger.

Continue

The Debugger pauses the execution of the code when it reaches a breakpoint. On the Debug menu, you can select Continue, Step Into, Step Over, or Step Out to continue the execution.

Stop Debugging

Stop Debugging means terminating the debugging session. To stop the debugging process, click Stop Debugging on the Debug menu. Alternatively, click Stop on the Debug toolbar.

Restart

If you want to stop the current debug session and immediately begin a new one, use the Restart command. The current debug session will be terminated and a new one will start.