I just spent about 45 minutes getting my flash player to trace to a text file. So as of this writing, here are the current things that you should watch out for when attempting to trace() out with flash on linux:
Make sure that you have the debugger version installed. If you are using Ubuntu, or another distro that uses package management, remove the flash player package. On Ubuntu Feisty Fawn, this is the flashplugin-nonfree package. Open synaptic and uncheck the package. It will warn you that you are removing the ubuntu-restricted-extras package also. Don't worry about this, as its a dummy package.
Install the debugger version from the adobe site. This is pretty straightforward.
Once installed, you must turn on the trace reporting by creating a file in your home directory called mm.cfg with the following contents:
TraceOutputFileEnable=1
ErrorReportingEnable=1
MaxWarnings=1
So what exactly will these three lines do? Well the first says that we should print out all trace() function calls to the file ~/.macromedia/Flash_Player/Logs/flashlog.txt. The second option says that we should also print out our stack traces and exceptions to the log file. Lastly MaxWarnings is how many lines the log file will contain until the player stops.
This page goes more in depth.A couple important points: The documentation is incorrect, and the output file is NOT ~/macromedia/Flash_Player/Logs/flashlog.txt but ~/.macromedia/Flash_Player/Logs/flashlog.txt . This is important because files with a '.' in front are hidden, so you won't see a 'macromedia' folder pop up in your home dir.
Secondly, the flash player is smart enough to create the ~/.macromedia/Flash_Player/Logs/flashlog.txt path, directories and all. So you do not need to create this path manually.
Ok, so now you've installed the debug version, and you've created your mm.cfg. Your logging to the file, and now you want to watch the output! Well, you have many options at your disposal. A favorite option is the FlashTracer extension for FireFox.
Here is a special version that works on Linux.Another option is to use 'tail' a basic command line program that displays the tail end of files:
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt
As with all command line programs, you can pipe them to do fun interesting things :)
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt | grep DEBUG
To just get all the lines with DEBUG on them.
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt | grep -C 3 DEBUG
Get the lines that have DEBUG on them, and the lines around them (useful for seeing what happened before and after the line in question).
And here is a simple script that encapsulates the above tail usage into a simple program:
#!/bin/bash
if [ -z "$1" ]
then
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt
else
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt | grep $1
fi