I have an object I need to examine in IE8. I tried the developer tools and console.log
, their Firebug equivalent. However, when I output the object to the log:
console.log("Element: ", element); console.log(element);
I only get the string
LOG: Element: [object Object]
instead of a clickable, examinable dump.
Is it possible to dump an object to the Log and examine its members, like in Firebug?
I can't use a homemade dump() function because the element I want to examine is so huge the browser will crash on me.
Here's one technique that I've found helpful:
A bit off topic (as it won't work for DOM elements) but I've found it handy to use the JSON.stringify(object) to get a JSON string for the object which is pretty readable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With