Visual Studio 2010 Local Variable History

给你一囗甜甜゛ 提交于 2019-12-02 02:04:39

问题


I'm working on debugging a process which has a number of nested loops which change a couple different local variables.

I can watch these by just stepping through...one iteration at a time, but it's quite tedious, and I'm losing track of my place. I simply don't have time to write down each variable, every single time.

Is there a way that I can see the history of a local variable? A plugin? Any ideas if not?


回答1:


How about logging the variables inside the loop with Debug.WriteLine or Trace.WriteLine? Then you can inspect the results afterwards.

If you're only interested in the values at certain points in a run, you could make the logging dependent on a Boolean variable's value, toggling it on and off manually in the debugger.




回答2:


May not be helpful in your case, but Debugger Canvas is pretty neat. It visually shows you the call-chain and allows you to "get an overview over recursive calls by showing one bubble per invocation"... check it out :)



来源:https://stackoverflow.com/questions/12714710/visual-studio-2010-local-variable-history

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