Debug JavaScript with Firebug & IE Dev Tools Console commands

Instead of debugging client-side code with the JavaScript alert command, using the Firefox Firebug extension & Internet Explorer Developer Tools' (F12 keyboard shortcut) Console commands makes debugging less distracting & simpler.

The following Console commands work in both IE & Firebug -


  • console.log
  • console.info
  • console.warn
  • console.error
  • console.assert


To use either of these in place of an alert in your JS code, make sure you have the Console enabled.

Trivia: Firebug was initially written by Joe Hewitt, one of the original Firefox creators. He now works at Facebook.

Comments