I'm debugging c# in visual studio
I added an object to the watch window
Given some value, is there any way to search which field holds this value?
The Watch Window allows you to see value of variables and expressions while debugging. It's kind of like the DataTip you get when hovering over a variable, except that you can write any expression you want. It's available from Debug | Windows | Watch | Watch 1 or Ctrl + Alt + W + 1.
To display the Immediate window, open a project for editing, and then choose Debug > Windows > Immediate or press Ctrl+Alt+I. You can also enter Debug. Immediate in the Command window. The Immediate window supports IntelliSense.
Searching for objects and properties in the Watch, Autos, and Locals Window by Leslie Richardson
I'm afraid there is no such built in search functionality in the VS2010 watch window (although the watch window has a lots of cool features).
See also this unresolved question: Searching for text in an Object watch window in visual studio
However there are some commercial extensions which offers that functionality.
E.g.: Excerpt from the OzCode VS extension feature list:
Search
When debugging objects and collections, you are often looking for a specific property or field, or a value held within a property or field. Unfortunately, this usually involves either a lot of clicking and scrolling, or writing custom debug-specific code. Finding items even in simple structures is not easy, not to mention doing so in a complex object graph. With our “Search” feature, this is no longer the case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With