开发者

watch variables that change with the level of recursion?

开发者 https://www.devze.com 2023-03-29 05:50 出处:网络
I\'m just debugging a recursive function, and the best on-the-fly inspection tool that I\'ve got at the moment is the Immediate window.

I'm just debugging a recursive function, and the best on-the-fly inspection tool that I've got at the moment is the Immediate window.

Is there anything that can be done to auto update the watch window based on the most recent level of recursion?

The watch behaviour that I'm having is that the added watch variable is the one I added, and not the new instance of it.

Perhaps this would be good as a VS feature reques开发者_StackOverflow中文版t. i.e. show me these variables relative to where I am on the call stack.


The Watch Window, the Autos Window and the Locals Window will all show you the current version of local variables.

And you also have the hover and pin features.

I suppose you're doing something with a reference type and/or a static var, but given the level of detail in the question it's hard to say.


I've not got visual studio at hand to find a better solution , but you could always add Debug.WriteLine to print a value to the output window

0

精彩评论

暂无评论...
验证码 换一张
取 消