Skip to content

Latest commit

 

History

History
87 lines (58 loc) · 4.15 KB

File metadata and controls

87 lines (58 loc) · 4.15 KB
title QuickWatch Dialog Box
description Learn how to use the QuickWatch dialog box as you debug code, to quickly view the data type and value of one Transact-SQL expression (such as a variable).
titleSuffix T-SQL debugger
ms.prod sql
ms.technology ssms
ms.topic conceptual
f1_keywords
vs.debug.quickwatch
helpviewer_keywords
QuickWatch Dialog [Transact-SQL]
ms.assetid d6bbb373-1452-41f2-bdc5-86ae689c3dc0
author markingmyname
ms.author maghan
ms.reviewer
ms.custom seo-lt-2019
ms.date 12/04/2019
monikerRange >=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

Transact-SQL Debugger - QuickWatch Dialog Box

[!INCLUDE SQL Server]

Use the QuickWatch dialog box to quickly view the data type and value of one [!INCLUDEtsql] expression, such as a variable or parameter, when you are debugging [!INCLUDEtsql] code. To watch multiple expressions, you can also add the expression to a Watch window.

[!INCLUDEssms-old-versions]

Task List

To access the QuickWatch dialog box

  • On the Debug menu, click QuickWatch.

To view the information about an expression

  1. In the Expression list box, type or select the expression that you want. The following [!INCLUDEtsql] expressions are supported:

    • Variables.

    • Parameters.

    • System functions whose name starts with @@.

    • Expressions built by applying operators to one or more variables, parameters, or system functions, such as @IntegerCounter + 1, or FirstName + LastName.

    • Transact-SQL statements that return a single value, such as: SELECT CharacterCol FROM MyTable WHERE PrimaryKey = 1.

  2. Click Reevaluate.

To add the QuickWatch expression to a Watch window

  • Click Add Watch.

To change the value of the QuickWatch expression

  • Right-click the expression, and then select Edit Value.

Options

Expression list
Displays the currently selected expression. The drop-down list contains a set of expressions that you can select to display. The expressions in the list are those available in the scope of the stack frame that is currently selected in the Call Stack window. To display a different expression, either enter the expression or select it from list. The [!INCLUDEtsql] debugger supports the following expressions: variables, parameters, and the system functions that have names that start with @@.

Value grid
Displays the properties of the expression that is currently being watched.

Name
Is the [!INCLUDEtsql] expression being watched.

Value
Displays the value that is currently assigned to the expression. A blank is displayed when the expression currently has no value.

If the length of an expression is larger than the width of the Value column, a tooltip displays the full value when you move the pointer over the Value cell for that expression.

A magnifying glass icon in a Value cell indicates that the [!INCLUDEtsql] debugger visualizer is available. In the list, you can specify Text Visualizer, XML Visualizer, or HTML Visualizer. To start a debugger visualizer, click the magnifying glass icon. The [!INCLUDEtsql] debugger opens a dialog box that displays the data in a format appropriate to the data type.

Type
Displays the data type of the expression.

See Also

Transact-SQL Debugger
Transact-SQL Debugger Information
Watch Window
Locals Window
Call Stack Window
Expressions (Transact-SQL)