Search code examples
internet-explorerie-developer-tools

Displaying objects in IE Developer Tools console


I'm debugging my web application in Firefox, Chrome and Internet Explorer. With the latter I'm using Developer Tools to debug my scripts.

The problem I'm having is that when I write some expression in console window and it should return an object all I can see is a simple {...} which isn't really helpful.

Is it possible to make it work similar to Firebug or Chrome console that actually display object content. Chrome is the best in this regard, because you can directly traverse the whole object as in Visual Studio.

Anyway. Is it possible to make IE Developer Tools console to display object properties and their values?


Solution

  • If the Prototype API is an option, you can debug your objects like so:

    var obj = window.JSON.parse('{"d":"2010-01-01T12:34:56Z","i":123}');
    alert($H(obj).inspect());
    

    Other than that, I know of no other way to not get the really helpful {...}.