Firebug is certainly a wonderful tool for javascript debugging; I use console.log() extensively.
I wanted to know if I can leave the Firebug-specific code in production.
I use this in OOP Javascript, making my own wrapper for log that checks that firebug exists:
myclass.prototype.log = function() { if( typeof window.console != 'undefined' ) { console.log.apply( null, arguments ); } }
Just call:
this.log( arg1, arg2, ...)