共用方式為


Watch Command

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Creates and opens a specified instance of a Watch window. You can use a Watch window to calculate the values of variables, expressions, and registers, to edit these values, and to save the results.

Syntax

Debug.Watch[index]

Arguments

index
Required. The instance number of the watch window.

Remarks

The index must be an integer. Valid values are 1, 2, 3, or 4.

Example

>Debug.Watch1

See also