Keil Logo Arm Logo

Technical Support

On-Line Manuals

µVision User's Guide

About µVision User Interface Creating Applications Utilities Debugging Using the Debugger Simulation Start Debugging Application Program Execution Debug Windows and Dialogs Breakpoints Window Call Stack and Locals Window Code Coverage Command Window Disassembly Window Event Viewer Execution Profiler Instruction Trace Window Logic Analyzer Setup Setup in Detail Restrictions Using the Logic Analyzer Memory Map Memory Window Performance Analyzer Registers Window Serial Window Symbols Window System Viewer Adding System Viewer Windows Toolbox Trace Data Window Trace Navigation Watch Window Expressions Constants System Variables Peripheral Variables I/O Ports Serial Ports Program Variables (Symbols) Fully Qualified Symbols Non-Qualified Symbols Literal Symbols Using Symbols Line Numbers Bit Addresses Type Specifications Operators Memory Type Specifiers Differences Between µVision and C Expression Examples Cortex-M Code and Data Trace Trace Features Tracepoint Expressions Tracepoint Intrinsics Tracepoint Limitations Configuring the Trace Hardware Tracepoint Marks Tips and Tricks Review Peripherals and CPU Configuration Simulate I/O Ports Simulate Interrupts and Clock Inputs Simulate external I/O Devices Assign Serial I/O to a PC COM Port Check Illegal Memory Access Command Input from File Preset I/O Ports or Memory Contents Write Debug Output to a File Keyboard Shortcuts TPIU Initialization after RESET (Cortex-M) Debug Commands Debug Functions Simulation Flash Programming Dialogs Example Programs Command Line Appendix

Watch Window

The Watch window allows to evaluate symbols, registers, and expressions. The window displays the item name, value, and type.

Watch Window ButtonOpen this window through the toolbar button or using the menu View – Watch Windows.

Watch Window Display

Where

search box Allows finding expressions within the current name list. The search string can consist of alphanumeric characters and mask characters as described in the appendix F. TR1 Search Expressions.
Name Lists the expression name. Symbol names comply to the rules described in Program Variables (Symbols).


Items are marked with an icon:

  • Structure icon - identifies items of a complex type, such as structures or arrays.
  • Simple icon - identifies items of a simple type, such as integers or characters.
Value Shows the memory address or the evaluated value of an expression. This field can contain explanatory text. Expressions of the type unsigned char show the value and the corresponding character. A single-quote () indicates that the value was restored from a previous debugging session.


Values are updated:

  • Whenever program execution stops.
  • During program execution when View - Periodic Window Update is enabled.
  • When clicking the Toolbox button Update Windows.
Type Shows the type of the expression. For functions the field shows the return and parameter types.

Using the Watch Window

Drag&drop expressions to other windows, for example to a Memory, Command, or Logic Analyzer window.

Add an Expression

  • Double-click the text <Enter expression> and start editing. Refer to the section Expressions for details.
  • Drag&drop expressions from other windows into the Watch window.
  • Open the context menu of a file. Use Add item to - Watch #. The variable beneath the mouse position is added to the Watch window.
  • Use the command WatchSet in the window Command.

Remove an Expression

  • Click on the item name and press the Delete key.
  • Use the command WatchKill in the window Command.

Change the Value of an Expression

  • Click on the value-field and start editing. Not all expressions accept changes.

The context menu allows:

  • Removing an expression.
  • Changing the value representation.
  • Setting breakpoints.
  • Adding expressions to other windows.
  • Showing or hiding the toolbar that contains the search box.

Keil logo

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