Is it possible to search inside an object for values and/or other field while debugging a C# application? I'm looking for a deep search that can drill down the object for many levels.
What I'm looking for is a way to search (like F3 for documents search) inside very complex objects (while debugging, in the Quick watch window for example).
Try using F10 or F11 to get further down your objects. Also, there is built-in functionality to view object values etc. I think you need to be more specific what you mean by "search" to get better answers.
When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable. If the variable is an object, you can expand the object by clicking on the arrow to see the elements of that object.
To debug a function which is defined inside another function, single-step through to the end of its definition, and then call debug on its name. If you want to debug a function not starting at the very beginning, use trace(..., at = *) or setBreakpoint .
You could use OzCode (an add-on for Visual Studio), which lets you search for the members you want to see from within the on-hover-DataTip or the QuickWatch window.
See example in the following screenshot:
Full disclosure: I am the co-creator of "OzCode".
If you want to do whitout an add-on it can be done by going to the object list, selecting all objects (ctrl+a) and copy them to a searchable text-editor. This will give you a newline seperated list.
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