Sometimes when programming, you have to debug your application. Yes, even when using Adobe Flex. The problem (and on the other hand, the good thing) is, that living in a Linux world makes you the one responsible for enabling every feature you need.

In this case, as mentioned, the feature I needed was to enable the trace() method for debugging Flex applications. To achieve this is actually quite simple. You just have to create a file in your home folder, named mm.cfg. When enabled, tracing is done automatically to the file $HOME/.macromedia/Flash_Player/Logs/flashlog.txt (you can, however, modify this location in the mm.cfg file).

The content of a simple, yet functional mm.cfg file sample is given below.

TraceOutPutFileName=$HOME/.macromedia/Flash_Player/Logs/flashlog.txt
ErrorReportingEnable=1
TraceOutputFileEnable=1

There is one more caveat though. The trace() method only works when viewing your flash application in a debugging-enabled
version of the Flash Player (or the flash plugin in mozilla).

As an added bonus, there is a plugin for Firefox, Flash Tracer, that will display a sidebar with the output of the trace() calls. This can be quite handy so not to have to open a terminal just for viewing the log file.

Now that you know the truth, off you go, and happy debugging!

Leave a Reply

You must be logged in to post a
video comment.