How can I search automatically for values and variables in Firebug/Script/Watch?

631 views
Skip to first unread message

Philip

unread,
Feb 15, 2011, 7:43:25 PM2/15/11
to Firebug
I'm looking at an extensive webapp and I want to find a particular
object. I set a breakpoint to inspect available variables and I have
some educated guesses as to what property values are defined by the
object or what kind of selfdocumented variable names could have been
used for the object. Instead of tediously/manually searching the tree
structure in the Script/Watch tab, is there an automated search
feature by which I can search for all variables and values that are
available to me at the current scope?
I know there is a search box for the actual JS code that is displayed
on the left side, but I need to search stuff on the right side in the
'watch' tab.

John J Barton

unread,
Feb 15, 2011, 8:46:17 PM2/15/11
to Firebug
In the toolbar that has the Script panel tab there is a command line
button, looks like a stack of lines: [=].
While on a breakpoint, Click it.
You will see a command line open below.
If you type 't' you will see auto completion, that is every thing that
starts with t in this stack frame.

You can also put complete variable names into the Watch panel New
Watch expression. There you will see the values in case you don;t to
hunt them down in the Watch panel.

Finally you can right click on objects in the Watch panel and pick
Inspect in DOM panel. There you can search the properties of that
object using the DOM panel search.

That is what we have now.

jjb

Philip

unread,
Feb 15, 2011, 11:32:52 PM2/15/11
to Firebug
Thanks for your recommendations. These are very useful features to
have. However, when you have a webapp with dozens of JS classes
(linked via EXTJS framwork) and hundreds of variables in any given
runtime position and you have to hunt down a variable, producing the
initial part of a variable name like
this.fieldInstanceExampleA.fieldInstanceExampleB.fieldInstanceExampleC
is not practical. That's why I'm looking for a search feature for the
"watch"-panel, but it doesn't seem to exist. In the above example, I
want to be able to enter ExampleC in the search box and desire
this.fieldInstanceExampleA.fieldInstanceExampleB.fieldInstanceExampleC
to pop up/be highlighted.

John J Barton

unread,
Feb 16, 2011, 12:18:38 AM2/16/11
to Firebug
Let us know if you would like to work on such a feature and we will
try to help you get started.
jjb

Honza (Jan Odvarko)

unread,
Feb 16, 2011, 8:39:37 AM2/16/11
to Firebug
This bug is tracking search in side panels:
http://code.google.com/p/fbug/issues/detail?id=3575

Honza

Ankit Ahuja

unread,
Feb 10, 2014, 8:57:30 AM2/10/14
to fir...@googlegroups.com
does the dom panel work in the way philip is asking about? can we look for partial words in the DOM panel? will this work for both variable names and the data they reference? then, is it safe to say that by inspecting "this" in the DOM panel, we get a full-featured search of the watch panel?

Sebastian Zartner

unread,
Feb 11, 2014, 3:53:18 AM2/11/14
to fir...@googlegroups.com
Please see John's and Honza's comments. They already explain what's currently possible and point to issue 3575, which is asking for a side panel search feature.
Inspecting 'this' doesn't give you local variables. Though you can click on an object of the current call stack frame inside the Watch side panel to search through it's properties inside the DOM panel.

Sebastian
Reply all
Reply to author
Forward
0 new messages