I have opened the Javascript Debugger (Ctrl+Shift+L) in Chrome and started using it to set breakpoints in my code.
This is a much different interface compared to Firebug, (it's all command line driven) so I'm wondering how to do a simple thing like print 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 I only seem to get a single property back, and I'm not sure which property will appear:
$ print opts
#<an Object>
Trying to get all the properties:
$ print for(var p in opts) p;
prop1
Any ideas? It obviously has more than just one...