Introduction
This post refers to browser debugging with
Firefox 3.6.8
MacBook OSX 10.4.11 (Intel)
There are 4 main steps to getting your environment up and running for debugging.
- Install the Debug version of Flash Player.
- Configure the Debug player with mm.cfg.
- Check the debug player is writing to the logfile flashlog.txt.
- Track the logfile output in realtime.
1: Install the Debug version of Flash Player
1.1 Go to the adobe download page:
http://www.adobe.com/support/flashplayer/downloads.html
1.2 Download the plugin content debugger dmg file.
http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_plugin_debug_ub.dmg
1.3 Close all browser windows, open the dmg, and run the plugin installer (I also archive a copy of the dmg file, renamed with the version number).
1.4 Check the player has installed correctly by opening you browser navigating to some flash web content. CTRL + Click on the swf stage area and you should see the context menu with an item named “Debugger”.

Default context menu for debug player
You can also check your Flash Player is a debug version by checking the version and isDebugger properties of the flash.system.Capabilities class. A test SWF file can be found here.
2: Configure the Debug player with mm.cfg.
The Debug Player configuration requires the the creation of the mm.cfg file.
(Oddly this is not created automatically when the debug player is installed).
2.1 Create a config file mm.cfg (it’s just a text file with *.cfg tag) and save it to
HD/Library/Application Support/Macromedia/mm.cfg
OR:
HD/Users/username/mm.cfg
2.2 Add the following lines to mm.cfg file
ErrorReportingEnable=1
TraceOutputFileEnable=1
MaxWarnings=0
3: Check the debug player is writing to the logfile flashlog.txt.
The flashlog.txt is a text file which the Flash debugger player writes all the trace/error messages into. It must be created at the default location of:
/Users/username/Library/Preferences/Macromedia/Flash Player/Logs/
3.1 Navigate to some flash web content that has a trace() statement output. Then open the flashlog.txt and eyeball the output. (test file here)
Troubleshooting:
3.2 If the text file is blank then there is no output or no recorded output
- Ensure that the flash content actually has some trace() statements to output.
- Ensure the flashlog.txt is not opened BEFORE you navigate to the flash content. (close and reopen the file).
- Double check the steps above have been followed correctly. Ensure ErrorReportingEnable and TraceOutputFileEnable are set to 1 not 0.
4: Track the logfile output in realtime.
Now that you have a working and configured debugger that is writing to the flashlog,txt you might want a user friendly way of tracking the output in real time rather than manually opening the flashlog.txt.
My prefered methods are:
Track output 1: Flash Tracer a Firefox plugin by Alessandro Crugnola [sephiroth].
Install FlashTracer from http://www.sephiroth.it/firefox/flashtracer/
When you restart firefox you can open the FlashTracer panel from the Tools menu and if your logfile.txt is being written to in part 3 then you should see the contents of the log file in the FlashTracer panel.
If you see nothing then make sure that FlashTracer in pointing to your flashlog.txt file by checking Prefences (spanner icon in the FlashTracer Panel) > General Settings > Select Output File.
Track output 2: Terminal (Mac OSX)
Open the terminal Applications/Utilities/Terminal
At the prompt type:
tail -f /Users/dsmith/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
Or you could save time by typing:
tail -f (with a trailing space, then drag and drop the flashlog text file onto the terminal shell window).
(Note the backslash in the file path because of the space character in the name of the “Flash Player” directory).
Notes:
1: Standalone Player
Once your debug player and log tracking is up and running there is nothing stopping you from using a standalone projector with debug.
You would have to use the “Projector content debugger” version from the flashplayer downloads page and ensure it was targeted correctly when launching when an swf.
The projector will output to the flashlog.txt and the terminal or flashTracer will automatically track this as with browser debugging.
2: Location of mm.cfg file.
On Mac OSX, Flash Player first looks for looks for mm.cfg in home directory: HD/Users/username
If the file is not found it then checks in:
HD /Library/Application Support/Macromedia
However that only seems to happen on first run, once the mm.cfg has been found the Flash Player always uses that location.
3: Definition of mm.cfg properties.
TraceOutputFileEnable – Boolean enables/disables trace() statements being written to flashlog.txt.
ErrorReportingEnable – Boolean enables/disables ERROR messages being written to flashlog.txt.
MaxWarnings – Maximum number of messages that the debugger will write to the logfile before stopping. a value of 0 means all messages will be recorded. Naturally the more messages outputted may hinder performance of swf.
The mm.cfg file used to have a TraceOutputFileName property. This allowed a custom location to be defined for the output logfile. However since Flash Player 9,0,28,0 The default location of flashlog.txt cannot be modified and this property has become redundant.
4: At the time of writing the latest debug player is
10.1.82.76
Links:
Configuring the debugger version of Flash Player:
This contains lists of the locations for mm.cfg file, flashlog.txt across multiple OS and descriptions of the mm.cfg properties.
http://livedocs.adobe.com/flex/3/html/help.html?content=logging_04.html



