问题
Wehn I debug and reach a breakpoint I can see only the local variables in the Locals tab in visual studio 2008.
where to observe the global data structures, variables in visual studio?
回答1:
In the Watch window. The Local tab is for local variables, as the name clearly suggests.
You'll need to add the variable manually. You can go to the quick-watch window - Ctrl + Alt + Q, enter the variable name there, and press Add Watch. The variable will be added to the Watch window.
回答2:
Watch is obviously the best way to do it, but there is also useful window Autos, which automatically shows variables depending on context (e.g. what is used in current line).
You can turn it on during debugging Debug -> Windows -> Autos (CTRL + D, A).
来源:https://stackoverflow.com/questions/9701636/where-to-observe-the-global-data-structures-variables-in-visual-studio