Configure Debug Version of the Flash Player

As I don’t always have access to the Adobe Flash IDE, I wanted to be able to view debug output for applications developed as pure ActionScript. Using the Flex 3 SDK, I can compile SWF files on the command line. Using the Debug version of the Flash Player, I can view trace output, as long as the Flash Player has been configured for debugging.

Configuring the Debug version of the Flash Player requires adding a file in the right location for each operating system.

On the Mac:

/Library/Application Support/macromedia/mm.cfg

On Windows XP:

C:\Documents and Settings\user_name\mm.cfg

Adobe provides the following content for a sample mm.cfg file:

ErrorReportingEnable=1
TraceOutputFileEnable=1

On the Mac, I’ve found that the Console provides real-time feedback from the Flash Player when reading the flashlog.txt file. The file is located here:

/Users/user_name/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt

Or I can use Terminal with the following command to view real-time feedback:

cd ~/Library/Preferences/Macromedia/Flash\ Player/Logs
tail -f flashlog.txt

On Windows, I’ve found that I can accomplish the same thing when reading the flashlog.txt file by using Git Bash, which can be installed with Git on MSys installer. The file is located here:

C:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs\flashlog.txt

In Git Bash, I can run the following commands to get real-time trace output from the Flash Player.

cd ~/Application\ Data/Macromedia/Flash\ Player/Logs
tail -f flashlog.txt
Advertisements

About this entry