This is for all Greasemonkey developers who also use Firebug. Firebug is one of the best Firefox extension for developers. There are few workarounds to use Firebug console to log Greasemonkey debugging messages. But one which always work for me is detailed below. You can use other firebug logging functions similarly by prefixing unsafeWindow to them.
Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. If you first access the console before checking if it exists and creating it if not , this results into an error. In fact, neither does Firefox -- it is provided by a plug-in called Firebug; if you use a copy of Firefox without Firebug installed, then you'll get errors trying to call console just the same as with IE. Chrome and Safari do have a built-in console object, but don't count on it working in exactly the same way as Firebug or IE8.
To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 41, times. Learn more