Archive

Archive for the ‘Firefox’ Category

Firebug console wrapper

November 9th, 2010 No comments

The Firebug console is extremely useful when trying to debug javascript. However, for users that don’t have Firebug installed or are using a browser without a built in console, you either have to delete all logging from your scripts before publishing them or create a “dummy” console object to prevent errors.

A more convenient method is to create a wrapper for the console that you can call instead. Read more…

Categories: Firefox, Javascript Tags:

Automatically Collapse FirePHP Responses

November 3rd, 2010 1 comment

FirePHP is a Firefox extension that allows you to log directly to the Firebug console from PHP. This is great for AJAX applications because you can debug your server side scripts without interferring with the responses.

Each script that returns a FirePHP log will generate it’s own group in the Firebug console which is expanded by default which means if you are logging a lot of data on the server side (such as database queries) then there will be a lot of data displayed in the console which you may not want to see all the time.

My solution to this was to edit the FirePHP extension so that each script response is collapsed automatically. You can then click a response to expand it if you want to view more details. Read more…

Categories: Firefox, Javascript, PHP Tags: