where to observe the global data structures, variables in visual studio?

感情迁移 提交于 2019-12-12 16:26:59

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!