Firebug Target for Flex Logging Framework

We were talking about debugging Flash/Flex applications inside the browser the other day at MN.swf Camp and I mentioned that someone had created something called FlashBug that interfaced with Firebug. I’d never really looked into it much, but I knew it existed at one point. Well, it turns out the link to that is broken. So I did a little digging and found that the interaction with Firebug is super simple. So I decided to create a custom Target that works with the Logging framework in Flex. The following is an example of how to use this target:

import com.dannypatterson.logging.FirebugTarget;
import mx.logging.ILogger;
import mx.logging.Log;
var logger:ILogger = Log.getLogger("myLogger");
var logTarget:FirebugTarget = new FirebugTarget();
logTarget.addLogger(logger);"info from flex");
logger.error("error from flex");
logger.warn("warn from flex");
logger.debug("debug from flex");

Download the FirebugTarget class here.

6 thoughts on “Firebug Target for Flex Logging Framework

  1. Pingback: » Flexのtrace出力をFirebugに送る …The ballad of dead pixels…

  2. Pingback: Firebug for Flex | dehash

  3. Pingback: Newman Zone » Blog Archive » Debugging Flash Player with Firebug and Chrome

  4. Pingback: Visual Harmonics » Post Topic » ActionScripting Nirvana: mx.logging to the Rescue

  5. Steve Berube

    Just wanted to let you know, this class will also work (unmodified) with Chrome Developer Console, and IE developer Toolbar.

    I’ve modified your class a bit, but I called it BrowserConsoleTarget.

    Here is how I output the messages:

    var date:Date=new Date();“console.debug”, date + ” [” + + “] ” + “\n” + event.message);

    Just to add a bit more info to it.


Leave a Reply

Your email address will not be published. Required fields are marked *