Displaying objects in IE Developer Tools console

前端 未结 8 813
野的像风
野的像风 2020-12-29 04:31

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 i

相关标签:
8条回答
  • 2020-12-29 04:42

    Try console.dir(/*object*/); This should give you a little more detail in ie.

    0 讨论(0)
  • 2020-12-29 04:42

    What works for me and this may just be something they added recently but after you pull up the console log. Clear the log but leave the console open then refresh the page. As the page loads in, you should then be able to explore the objects. I am not sure why it needs to be done that way but it appears to work.

    0 讨论(0)
  • 2020-12-29 04:46

    Here's a rather off-the-wall way to do it... run the object through JSON.stringify and display the results of that instead.

    0 讨论(0)
  • 2020-12-29 04:47

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

    0 讨论(0)
  • 2020-12-29 04:49

    I use the built in JSON object.

    JSON.stringify(my_object)
    
    0 讨论(0)
  • 2020-12-29 04:55

    To explore an object's properties and values in IE you must first:

    • Have a breakpoint set (or script debugging enabled)
    • Trigger the breakpoint (or encounter an error)

    The locals tab has the properties and details locally available at the time the breakpoint was triggered Adding an object name to the watch tab you can view the properties and details of the named object

    Our "friends" at Microsoft have a video describing IE's developer tool. At 3:03 is when they mention this "easy" way to explore objects.

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