I opened the Javascript Debugger (Ctrl + Shift + L) in Chrome and started using it to set breakpoints in my code.
This is a great interface compared to Firebug (it all controls the command line), so I'm wondering how to do a simple thing, such as printing all the properties of an object.
If I have an object like this:
var opts = { prop1: "<some><string/></some>", prop2: 2, prop3: [1,2,3] }
I can set a breakpoint and inspect the object, but it seems to me that I am returning only one property, and I'm not sure which property will appear:
$ print opts
Trying to get all properties:
$ print for(var p in opts) p; prop1
Any ideas? He obviously has more than one ...
source share