views:

5251

answers:

8

Whats an easy way to see the trace() of Flash/Flex movies when running in any browser?

+9  A: 

I got it working at last, using the Debugging Flash player ...

  1. Download and install the Flash 10 Debug Player for FireFox (the "Netscape" version)
  2. Enable trace logging using these official steps

... and a Firefox addon that shows me the trace() output:

  1. Download and install the FlashTracer addon for Firefox
  2. Open up Firefox, go to the HTML page with your Flash content
  3. Tools > Flash Tracer
  4. Click the small Spanner icon on the bottom-right of the FlashTracer panel
  5. Set your path based on your OS
  6. Restart your browser if you still can't see the trace() output
  7. You're done! Enjoy the output
Jenko
+4  A: 

Check out De Monster's MonsterDebugger. You can debug track objects, traces, and display chains in a lovely AIR application. Very fun to use. And it's open source!

http://demonsterdebugger.com/

You can also configure Flash and Flex to write to a log file. Check out how to do that here:

http://livedocs.adobe.com/flex/3/html/help.html?content=logging_04.html

I've been using Monster lately, but I used to have an alias that ran a unix "tail" on the flashlog file that would effectively give me a logging window for "in browser" tracing:

alias flashlog='tail -f /PATH/TO/flashlog.txt'

Or if you have a log viewer (like Console on Mac OS), you can view the log there. The only reason I suggest these options is that FlashTracer is pretty "crashy" ;)

Typeoneerror
Not perfect since it only caters to AIR and AS3 apps.
Jenko
Ha, ok. What, if anything in life, is perfect?
Typeoneerror
+2  A: 

Probably not as fancy as the others or cutting edge, but I used to create my own log function in the flash movie (funnily enough, called log) that called trace and also called a js function on the page (using whatever method your comfortable with). The function on the page was just a simple console.log() with Firebug. Simple and worked a treat.

rXc3NtR1c
+1  A: 

I am a happy Thunderbolt user, maybe it is also worth a look (multiple log levels, plays nicely with firebug out of the box).

moritzstefaner
+1 for Firebug integration.
Jenko
A: 

Since macromedia was aquired by adobe,I thought it should be 'D :\Documents and Settings\user_name\Application Data\Adobe\Flash Player\Logs\flashlog.txt '.Which resutlted in loss of few minutes for me.Finally i decide to give it a try to look at D:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs\flashlog.txt and bingo i could see the flash trace() outputs.

I wonder why adobe is sill keeping the log file location in macromedia folder.Whatever it is I can see the trace ouptuts of flash applications run inside a browser and i am a happy man :)

A: 

I just made a simple class for the job, same basic idea as mentioned above (uses Firebug's console), really simple and doesn't need any code in the containing html, works even without a container. http://www.ajvweb.fi/blog/?p=119

Apeli
A: 

Vizzy makes life easier if you want a basic logfile viewer. You just install the debug player and then install Vizzy. It is a window that tails the flashlog file. The sweet thing is that is does all the mm.cfg file b.s. for you.

http://code.google.com/p/flash-tracer/

Tim B.
A: 

In windows, If you use a localized version (i.e. spanish) of the operating system, 'Application Data' must be replaced with the localized version (i.e. "Datos de programa")

Ismaelj