Schöner Debuggen: »prettyPrint« für JavaScript

James Padolsey bietet mit »prettyPrint« eine art Variablen-Dumper für javaScript an (so in der Art wie JavaScript Dump:

»prettyPrint« is an in-browser JavaScript “variable dumper” similar to ColdFusions’s cfdump. It enables you to print out an object of any type in table format for viewing during debugging sessions. In combination with Firebug, »prettyPrint« will make you the best-equipped JavaScript debugger on earth! (not guaranteed)

Some of its key features:

  • Entirely independent. It requires NO StyleSheets or images.
  • Handles infinitely nested objects.
  • All native JavaScript types are supported plus DOM nodes/elements!
  • Protects against circular/repeated references.
  • Allows you to specify the depth to which the object will be printed.
  • Better browser users benefit from gradient column-headers! Thanks to HTML5 and CANVAS!
  • Allows low-level CSS customisation (if such a thing exists).
  • Fully validated with JSLint!