Monitor expressions and variables.
Sébastien Granjoux
seb.sfo@free.fr
Philip Chimento
philip.chimento@gmail.com
Daniel Nylander
po@danielnylander.se 2007
Anders Jonsson
anders.jonsson@norsjovallen.se 2017

# Watch expressions

Watch expressions, or watches for short, are expressions that the debugger evaluates and prints the result of every time the program is stopped; for example, after every single-step through the program.

# List watched expressions

From the main menu, select View Watches to open the Watches window.

Like local variables, all watch expressions are displayed in a tree with children used to represent structure or array members.

## Variabel

The name of the variable or the expression.

## Värde

The variable or expression value.

## Typ

The type of the variable or of the expression result.

# Uppdatera bevakare

Watch expressions can be updated automatically as soon as the program is stopped or on user request.

To set a watch expression to update automatically:

In the Watches window, select the watch you want to update automatically. Right-click and check that Automatic Update if checked. If not, select it.

To update a watch expression manually:

In the Watches window, right click and select Update Watch to update the selected watch.

To update all watch expressions manually at once:

In the Watches window, right click and select Update all to update all watches at the same time.

# Add a watch on an expression

To add an expression to the watch list:

From the main menu, select Debug Add Watch... or in the Watches window, right-click and select Add Watch....

Enter the expression to watch. Check Automatic Update if you want the expression to be evaluated each time the program is stopped.

An expression can be evaluated and then added as a watch like this:

From the main menu, select Debug Inspect/Evaluate or right click in the Editor window and select Inspect/Evaluate.

Click on Add button to add this expression to the watches list.

# Ta bort en bevakare

You can remove an expression from the watches list.

In the Watches window, select the watch you want to remove, then right-click and select Remove Watch.

All watches can be removed at the same time.

In the Watches window, right-click and select Remove all.

# Ändra värdet på en variabel

If a watch expression corresponds to a variable, you can change its value.

In the Watches window, select the variable you want to edit and double click in the Value column.

Ange det nya värdet.