Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a way in VS2008 to search through a watch or a quickwatch for a particular value?
    text
    copied!<p>Suppose I am watching something in VS2008 and I want to search the object I'm watching for an instance of a particular value.</p> <p>For example, say I'm watching <code>this</code> and I want to search for a control called <code>mycontrol</code> inside it or I want to search for a <code>string</code> that currently has the value of "Hello World".</p> <p>I know it's kind of a brute force way of doing things, but I find it would be a quick way of identifying where things are going wrong whilst debugging. Warning: I'm about to swear... When I was using PHP, I could see all variables that were currently set by using <code>get_defined_vars()</code>. It was dirty, but it was quick and I'd like to know if there's something similar I can do in VS.</p> <p>Sorry if I've been a little vague, I'd be happy to elaborate if you have questions.</p> <p>Cheers Iain</p> <p>Edit: What I'm actually tring to do is interrogate the current state of the application and quickly search for the various classes that I want to debug. What I'm doing is trying to debug where I don't have the source code (I'm writing a control for a CMS). So I know what the value of something should be, but I don't know where in the structure it exists - that's what I want to find.</p> <p>e.g. An exeption is thrown by the application because <code>foo</code> should be a list of the type <code>bar</code>. I want to find out where <code>foo</code> is defined so I can look around and see what the other variables in the same class are set to.</p> <p>Sorry again, I'm finding it hard to explain :(</p> <p>Edit #2: I find a good tree might help me visualise it better...</p> <pre><code>Quickwatch -this -var1 +var1a +var1b -var1c -base -foo = "Hello World" +var1ca +var2 +var3 </code></pre> <p>In the above, how would I quickly drill down through the structure to find <code>foo</code>?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload