PDA

View Full Version : howto inspect ext object in firebug ?



skanan
19 Feb 2010, 2:27 PM
Hi,

I have been able to use firebug to inspect Arrays and other kind of things. However,
when I use firebug "watch" to look at ext object such as store, I'd get something like this

Object { data=Object, more...}

The inspect command from console like this does not work either.

>>>inspect(store)

does not show anything.

I'd like to know a debugging tip for me to look inside this. I realized that this is not ext problem but probably just the limitation of firebug or myself. Would there be a better tool for this ?

Thanks
-Nick

ckr
20 Feb 2010, 7:54 AM
In your javascript add: console.dir(yourObj);

Then go look at your console tab ;-)


http://getfirebug.com/wiki/index.php/Console_API

skanan
24 Feb 2010, 2:15 PM
Thanks! I wish it would be that easy. It will print "undefined". Please see this attachments in png format.

All I want to know is the name of all members in aaa object.

Here is cut and past of console output in text format.

>>> aaa = {x:1, y:2}
Object { x=1, more...}
>>> console.dir(aaa)
UNDEFINED
>>> aaa
Object { x=1, more...}

skanan
24 Feb 2010, 2:19 PM
I found out one way to do that is something like this.

JSON.stringify(aaa)

Wedgie
24 Feb 2010, 2:55 PM
Not sure if I understand what you are missing but in my "watch" window in the Firebug debugger there is a [+] glyph next to the object. When I click that I can drill down into it.

No - I don't think there is a better tool for this.

HTH

skanan
2 Mar 2010, 11:25 PM
Thanks!

I think I know why my question does not make sense. Somehow, when I clicked to inspect object, the DOM tab said, "There are no properties to show for this object". So, I thought that I could not inspect object.

After removing all adds-on and install just firebug, I can inspect all the objects I wanted.