## Setting Conditional Watchpoints

Use the Properties view to set a conditional watchpoint. A conditional watchpoint has an associated conditional expression. The debugger evaluates the expression to determine whether to halt program execution at that watchpoint.

A conditional watchpoint behaves in two different ways:

- If the expression evaluates to true (a non-zero value), the debugger halts program execution when the memory location associated with the watchpoint changes value.

- If the expression evaluates to false (a zero value), program execution continues without stopping.

#### To set a Conditional Watchpoint

1. Find the watchpoint that you want to associate with a conditional expression in the Breakpoints view
2. Right-click the watchpoint, then select the Properties menu item

The Properties view appears.

3. Enter an expression in the Condition text box

During subsequent debugging sessions, the debugger evaluates the expression to determine whether to halt program execution at the conditional watchpoint.

4. Click OK

The watchpoint's Proeprties window closes.

##### Related concepts

- Watchpoints
- Breakpoints

##### Related tasks

- Setting Watchpoints
- Enabling Watchpoints
- Disabling Watchpoints
- Clearing Watchpoints

##### Related references

- Breakpoints view