The information in this article applies to:
SUMMARYConsider debugging the following program in WinDbg:
Notice that there is a global variable x and a local variable x.
Before you step into main, if you set watchpoints on x and y, the Watch window will display a value for y but for x will say "Expression cannot be evaluated." To see the value for x, use ::x and x will evaluate to the local x in main once you've stepped into main. MORE INFORMATIONWhen debugging an application, the X86 C++ evaluator is loaded. Given this, you can use the scope resolution operator in a watch statement to view a hidden global variable. Without the use of the scope resolution operator, there is no way (short of watching it in a memory window) to watch a hidden global variable. Additional query words: 3.10 3.50 4.00 95
Keywords : |
Last Reviewed: January 10, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |