Console.log in IE on an object just outputted [object Object]

前端 未结 4 1329
小蘑菇
小蘑菇 2021-02-03 18:09

I\'m used to debugging JavaScript in Chrome or Firefox just because their built in developer tools are a lot cleaner than IE\'s. IE8 came along way with the Developer Tools bein

相关标签:
4条回答
  • 2021-02-03 18:50

    You might want to try:

    console.log(JSON.stringify(foobarObject));
    
    0 讨论(0)
  • 2021-02-03 18:51

    Add the object to watch and you can see and analyze it completely from watch panel.

    0 讨论(0)
  • 2021-02-03 18:59

    Use:

    console.dir(obj); 
    

    This will will give you all properties of the object also in IE.

    0 讨论(0)
  • 2021-02-03 19:09

    Maybe you can try what Xavi suggested here: How do I dump JavaScript vars in IE8?

    0 讨论(0)
提交回复
热议问题