Find a variable with a given value in VS2008

Posted by Aaron on Stack Overflow See other posts from Stack Overflow or by Aaron
Published on 2010-02-12T16:22:07Z Indexed on 2010/05/08 23:28 UTC
Read the original article Hit count: 207

I have an instance variable with several members, many of which have their own members and so on. Using the debugger and watch variables, I found a string variable with a specific value that I need by diving into this variable's members.

However, after spending some time on other things and coming back to this, I am now unable to find where this value is located. When I have my application paused, is there a way to search the values of variables in the current context for a given value?

To clarify, if I have the given structure:

myVariable
|
|--aMember1
|  |--subMember = "A value"
|
|--aMember2
   |--subMember = "Another value"

Is there a way (possibly using the watch list in VS debugger) to search myVariable for any member or submember with the value "A value", returning to me the path myVariable->aMember->subMember?

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about .NET