Firebug‘s console object is an extremely useful tool for debugging and logging javascript interactions and responses, especially when working with AJAX and JSONP. What is not useful, is that when using the console object’s methods directly in your included javascript code, it will not work in most browsers other than Firefox, and of course it will cause errors if you (or your users) do not have Firebug installed.

Many of us have made the mistake of sometimes forgetting to delete our console code after testing and before launching our javascript to our production site, thus causing javascript errors, breaking the UI, or perhaps even breaking an entire application, depending on how javascript-dependent it is.

I aimed to solve this problem, and not just the problem of leaving the console code in my javascript by accident, but to allow it intentionally, if I wish, without breaking any browser that does not support it.

Continue reading