Export (0) Print
Expand All

Command Window

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Use the Command Window to run commands, such as debug and edit commands, against the code in the SQL Server Database Engine Query Editor window that is currently being debugged. You must be in debug mode to use the Command Window. The Transact-SQL debugger supports many of the commands that are also supported in the Microsoft Visual Studio Command window. For more information, see Visual Studio Command Window.

To access the Command Window

  • On the Debug menu, click Start Debugging.

To print the value of a variable

  • In the Command Window, type Debug.Print <VariableName>, and then press ENTER.

To list information about the current thread

  • In the Command Window, type Debug.ListThread, and then press ENTER.

To add a variable to the QuickWatch window

  • In the Command Window, type Debug.QuickWatch <VariableName>, and then press ENTER.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft