see actionscript trace() from swf running in the browser

It is possible to see your ActionScript trace statements when you run your swf in a browser. Definitely nothing new, but something that I come back to seldom enough that I need a reminder of the necessary steps. That’s the purpose of this: a quick list in note-to-self form, just so that all the steps and links are condensed in one place.

The main ingredients: Flash debug player, a flashlog.txt file, and Terminal (to see live changes). For the record, I’m on a Mac with OS X, no help for Windows here.

The basic steps:

  • 1. Uninstall player (if necessary) and install debug player
  • 2. Make sure you have flashlog.txt in /Users/your_user_name/Library/Preferences/Macromedia/Flash\ Player/Logs/
  • 3. Open Terminal in that Logs location, do tail -f flashlog.txt

That’s it. Watch your trace messages – or more fun, anyone else’s you surf upon – appear in the Terminal window.

For the first step… Both the player uninstaller and the debug installer are on this page A really helpful page to check whether installing the debug version actually worked is here: Special bonus: it tells you explicitly whether you have the debug version or not. (Page seems broken now, hopefully that’s not permanent.)

The second step is about the file that the trace statements get written to. If you don’t have one there, just save a text file there with that name.

And finally, the third step lets you watch the changes live. Otherwise I found I needed to close and re-open the file to see new traces. So you’re actually using Terminal to watch what happens to the log file.

Thanks! to (more details there if you want em)

This entry was posted in flash, actionscript, flex, tech notes and tools and tagged , , . Bookmark the permalink.

4 Responses to see actionscript trace() from swf running in the browser

  1. Daniel says:

    Sound good, but for those who don’t feel like messing around with Terminal (or for those on Windows) it’s a lot easier using the Flash Tracer addon for Firefox, which displays a sidebar in the browser with the flash player trace output. You need to use the Debug version of the Flash Player for this one too though.
    More here:

  2. LucasC says:

    Thanks a lot !
    I wasn’t able to use FlashTracer with my Firefox 9.
    This ‘old school’ solution works perfectly well with Cygwin !

  3. I actually wrote up a small OS X app that does the trace command above after my FlashTracer stopped working too. I placed it on my dock so I could just click it and not having to bother with opening terminal and going to the correct folder etc. Take a look if you’re interested:

Comments are closed.