Keil Logo

Watch Window

Watch Window Button The Watch Window lets you view and modify program variables and lists the current function call nesting. The contents of the Watch Window are automatically updated whenever program execution stops. You can enable View – Periodic Window Update to update variable values while a target program is running.

Watch Window Display

Variable Values

The Locals page shows all local function variables of the current function. The Watch pages display user-specify program variables.

You can add variables in three different ways:

  • Select the text <type F2 to edit> with a mouse click and wait a second. Another mouse click or the F2 key starts the edit mode that allows you to add variables. In the same way you can modify existing variables.
  • In an editor window open the context menu with a right mouse click and use Add to Watch Window. µVision3 automatically selects the variable name under the cursor position, alternatively you may mark an expression before using that command.
  • In the Output Window — Command page you can use the WatchSet command to enter variable names.

To modify a variable value, select the value with a mouse click and wait a second. Another mouse click or the F2 key starts the edit mode.

To remove a variable, click on the line and press the Delete key or use the WatchKill command.

Function Call Nesting

The Call Stack page shows that current function call nesting. In the Call Stack page you can double click on a line to show the invocation an editor window.

Related Knowledgebase Articles

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.