Nick
Nick

Reputation: 19684

Output Flash Trace to Firebug Console

I am trying to output my Flash application's trace to the firebug console. After some Goggling I have found that other are doing something like this:

public static function debug(text: Dynamic):Void {
            trace(text);
            ExternalInterface.call("console.log", text.toString());
    }

My Firebug console never outputs anything and always just shows "Please Reload Page to enable..."

So, of coarse, I have reloaded the page and it does not seem to change anything. I have the correct Object imported into the calling class. I am running FireBug 1.4.2.

Can someone tell me how to implement this?

Thanks!

-Nick

Upvotes: 1

Views: 6930

Answers (4)

LiraNuna
LiraNuna

Reputation: 67292

You most likely want FlashBug.

Upvotes: 0

Chris Ciesielski
Chris Ciesielski

Reputation: 1203

I used Firebug quite a lot with Flex 3 applications. To combine those two tools I used 3rd party OS lib called Flash Thunderbolt. Project home page: http://code.google.com/p/flash-thunderbolt/

Your code looks fine however I didn't make an effort to paste run it by myself, Sorry ;) Anyway don't reinvent the weel just use ready tools. You can always have a look at thier code to learn how they solved that issue.

Cheers, Chris

Upvotes: 1

Pete Duncanson
Pete Duncanson

Reputation: 3256

Replace the console.log with an alert and see if it still fires in your browser. Could be an error somewhere that you are over looking as you are expecting the output. Flash has a habit of hidding JS errors and keeping them to itself.

Upvotes: 0

Juan Delgado
Juan Delgado

Reputation: 2030

I've seen this happening and somehow has to do with Firebug "stuck" in another Firefox window. I'm not sure why, but close all other windows and tabs, then open Firebug, then your application, that's how it works for me.

Try this, your code seems fine. I think it's a Firebug issue.

Upvotes: 0

Related Questions