You are on page 1of 5

WATCH VARIABLE

WHAT IS IT??? HOW TO USE IT??


• It is a debugging tool(window) available in Visual Studio.

• It is used to track and evaluate the variables or


expressions in the program.

• It is available only during the debugging session.

• Add breakpoints and select Debug->Windows-


>Autos/Locals/Watch.(Also make use of command
window)
TYPES OF WINDOWS
1. Auto Window – displays information which is
determined as important to the
current code statement.

2. Local Window – displays all the variables that are

in scope with the current method.

3. Watch Window – displays variables you have


added. Watches are saved with
your project which can be used
later.
ADD WATCH

• Right click on the variable and select add watch.

• Drag and drop the variable.

• Type in the Watch Window.


WATCH WINDOW VS QUICKWATCH

Watch Window - can add multiple variables and


can track and evaluate it.

Quick Watch - allows to evaluate only single


variable or expression.

You might also like