How do I dump JavaScript vars in IE8?

Here’s one technique that I’ve found helpful:

  • Open the Developer Tool Bar (hit F12)
  • Go to the “Script” tab
  • Click the “Start Debugging” button
  • Next, type “debugger” into the console and hit enter. This should trigger a break point.
  • Go to the “Watch” sub-tab
  • Click the row that says, “Click to add…” and enter a variable you’d like to examine. Note that the variable must be globally available.
  • At this point you should be able to examine your variable with tree-like UI
  • Once you’re done debugging click Continue button (or hit F5)

Leave a Comment