Reference Information ·
Quick Watch Dialog Box
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
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
{short description of image} Quick Watch Dialog Box
Fix List Dialog Box
Memory Check Dialog Box

Troubleshooting

Using Help



Bullet Overview
Bullet Quick Watch Dialog Box Description
Bullet Pop-up Menu
Bullet Tips
Bullet See Also

Line Graphic

Overview

The Quick Watch dialog box provides a way to quickly examine the value of a variable or expression. You can calculate the current value of a global variable, local variable, or variable not in the current stack. You can also use Quick Watch to edit the value of a variable or add a variable to the Watch view. See Tips for keyboard shortcuts for moving in the Quick Watch dialog box and editing a value.

You can access the Quick Watch dialog box on the Debug menu by clicking Quick Watch.

Line Graphic

Quick Watch Dialog Box 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.

Fields and Buttons

Field or Button Action
Expression text box Type the name of the variable or expression you want to calculate, or select one from the drop-down list of variables entered during the current debug session.

Current Value area View the name and current value of the variable entered in the Expression box.

The { . . . } symbol indicates that the expression 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.

Recalculate button Click to recalculate the current value of the variable or expression entered in the Expression box. The value is displayed in the Current Value area.

Add Watch button Click to add the variable or expression entered in the Expression box to the Watch view.

Close button Click to close the dialog box.

Line Graphic

Pop-up Menu

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

Command Action
Quick Watch Moves the selected expression to the top of the list in the Quick Watch dialog box and recalculates the value.

Add Watch Adds selected variable to the Watch view.
Line Graphic

Tips

  • When you click Recalculate, the value of a variable is highlighted in red if it has changed since the previous query.
  • Click the Quick Watch toolbar button to open the Quick Watch dialog box. If you selected a variable name in the Source view, the variable is entered in the Expression text box.
  • From the Source view, highlight a variable name to select it. Right-click the selection and then choose Quick Watch from the pop-up menu. The Quick Watch dialog box is displayed with the selected variable entered in the Expression text box.
  • The pop-up menu Quick Watch is especially useful when you are traversing linked lists or complex data structures that have a lot of nesting. If you have to traverse several levels to reach an element you want to watch, you can use the pop-up menu to move that element to the top of the list. You can also use the pop-up menu Add Watch to add an element directly to the Watch view.

Keyboard Shortcuts

Moving in the Current Value Area

You can use the following keys to move in the Current Value area 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