As answers in this question suggest, you could override toString()
method on objects to provide useful information during debugging (at least). This works nicely in Firebug, but this doesn't help at all in Chrome:
x = { toString: function () { return 'test' } }
gives a very helpful output:
Object
while in Firebug it's much better:
test { toString=function()}
I know that Chrome allows me to inspect object properties. This is useful, but it is much easier to have the object title list at least a few most important ones, so that you don't have to dig through 50 properties of a complex object just to find out one value.
So, is it somehow possible to make debug output in Chrome more useful?
EDIT:
This is what I want to achieve:
v [result of ???() on x]
a: 1
b: 'foo'
v c: [result of ???() on x.c]
foo: 'bla bla bla'
> bar: [result of ???() on x.c.bar]