Reference Information · Watch View Home and Help Icons Keyword Index Home Using Help
Line Graphic
Line Graphic

Contents

Keyword Index

Using the WDB GUI

Reference Information
Main Window
Menus
Toolbar Icons and Shortcut Keys
Views
Source View
Disassembly View
Command View
{short description of image} Watch View
Local Variables View
Call Stack View
Threads View
Registers View
Memory Usage View
Build View
Dialog Boxes
Load Program Dialog Box
Open File Dialog Box
Save/Restore Debug Session Dialog Box
Breakpoints Dialog Box
Source File Paths Dialog Box
Object File Paths Dialog Box
Signals Dialog Box
Find Dialog Box
Debugger Preferences Dialog Box
Quick Watch Dialog Box
Fix List Dialog Box
Memory Check Dialog Box

Troubleshooting

Using Help



Bullet Overview
Bullet Watch View Description
Bullet Pop-up Menu
Bullet Tips
Bullet See Also

Line Graphic

Overview

The Watch view displays the names and values of variables or expressions. It is similar to the Local Variables view, but the Watch view allows you to specify the variables or expressions that are displayed. You can watch global variables, local variables, or variables not in the current stack.

In the Watch view, you can:

  • Specify variables or expressions to watch.
  • Edit the value of all numeric variables, pointers, and static arrays. The modified value replaces the current value in the program.
  • Expand and contract an array, pointer, class, or structure by clicking the plus sign (+) to the left of its name. If expanded, clicking the minus sign (-) collapses the item.
  • Use keyboard shortcuts to move in the Watch view and edit a value. See Tips for keyboard shortcuts.

You can access the Watch view from the main WDB GUI window by clicking the Watch tab in the lower tabbed area.

Line Graphic

Watch View Description

NOTE : You can change the maximum number of string characters or arr ay elements to be displayed in the LocalVariables/Watch/QuickWatch views by using the preference in the Source View section of the Edit > Preferences dialog box. See Setting Debugger Preferences. Howe ver, please note that to optimize memory consumption of WDB GUI, it is recommended that you keep this number as small as needed for your debugging session.
Area Description
Name area Displays a list of variables or expressions that you specify. Click the plus sign (+) or minus sign (-) to the left of an expression's name to expand or collapse your view of the variable.

Value area Displays the value of a variable or expression. The { . . . } symbol indicates that the value can be expanded. Click the plus sign (+) or minus sign (-) to the left of the expression's name to expand or collapse your view of the variable.

Add text box Allows you to type the name of a variable or expression you want to add to the Watch view.
Line Graphic

Pop-up Menu

In the Watch view, click the right mouse button to display a pop-up menu that contains the following commands:

Command Action
Quick Watch Displays the value of the selected variable or expression in the Quick Watch dialog box.

Add Watch Adds selected variable or expression to the Watch view.

Delete Selected Line Deletes the selected variable and value from the Watch view.

Open Separate Window Displays the Watch view in a separate window, allowing you to see more than one GUI view at the same time.

Return to Main Window Closes the separate window and enables the Watch tab. Available when the Watch view is displayed in a separate window.
Line Graphic

Tips

  • The value of a variable is highlighted in red if it has changed in the current context since the last break in program execution.
  • To open or close the Watch view in a separate window:
    • Click the right mouse button to display a pop-up menu that contains commands to open and close a separate window.
    • Click the Watch toolbar button to open and close the Watch view in a separate window.
  • On the View menu, click Watch to quickly bring the Watch view to the top.

Keyboard Shortcuts

Moving in the View

You can use the following keys to move in the Watch view once a variable is selected. Select a variable by clicking on it.
Shortcut Action
Up Arrow Selects the previous line.
Down Arrow Selects the next line.
Enter Expands/collapses the selected expression, if a plus sign (+) or minus sign (-) appears to the left of the expression's name.
Home Moves to the beginning of the list.
End Moves to the end of the list.
Page Up Moves the list up a page.
Page Down Moves the list down a page.
Left Arrow or
Shift+Tab
Moves the focus to Name field of the line.
Right Arrow or
Tab
Moves the focus to Value field of the line.
Insert If the focus is in the Value field, selects the existing value for editing.

Editing a Variable Value

You can use the following keys to edit a selected value.
Shortcut Action
Esc Cancels the edit.
Enter Updates the program with the modified variable value.
Up Arrow Updates the program with the modified variable value, and moves the focus to the previous line's Value field.
Down Arrow Updates the program with the modified variable value, and moves the focus to the next line's Value field.
Line Graphic

See Also

Line Graphic

Return to Top