Avoiding the alert function for debug traces in Javascript is so simple, I never figured it out until now:

function debug(s) {
    if (! window.info_guillaume_d_console) {
        window.info_guillaume_d_console =

There are probably many issues with this but... anyway, for now it serves me well as Firebug's console.debug("foo") does not work for me in Firefox 3 Beta 3 (it prints OK but disappear once the whole page is loaded...), and this method beats "alert debugging" any time!

Update: Fortunately the above bug does not show up in Firefox 3 Beta 4 anymore (with unchanged Firebug 1.1.0beta10)!