trace() outside the Flash IDE with tail

Posted on February 20, 2007

As Josh Buhler and Mark Walters described it's simple to log the trace() outputs of a SWF file running in Browser. If you familiar with Terminal you can also log the trace()-methods by using the Unix command tail.

tail monitors in real time the growth of the logfile named flashlog.txt which is being written by the Flash Debug Player.

Instructions

Check that you installed the Flash Debug Player on your machine successfully.

Press CTRL and click on a Flashmovie located in Browser and you'll have a context menu with the "Debugger" option like the image above. If not, uninstall the current Player and install the latest version of the Flash Debug Player.

Add a textfile named flashlog.txt in the following folder /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/

The Flash Debug Player needs a textfile named mm.cfg. Typically it's located in /Library/Application Support/Macromedia/mm.cfg.

If not, create it and add the following properties:

TraceOutPutFileName=Macintosh HD:Users:{username}:Library:Preferences:Macromedia:Flash Player:Logs:flashlog.txt

Note: If you have installed a Flash Debug Player older than version 9.0.28.0 you have to add a path to your `flashlog.txt as well:

ErrorReportingEnable=0
TraceOutputFileEnable=1
MaxWarnings=0

Open the Terminal and type

tail -f /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt

screen_terminal.png

That's it ;-)

P.S. If you have any trouble with your configuration, check Mark Walters' detailed instructions, too.

Any feedback?

comments powered by Disqus