Sending Trace Statements to a log file with the Debug version of the Flash Player

Sometimes it’s more efficient to “tail -f” a log file rather than set breakpoints in your authoring environment. This is kind of an “old school” technique for Flash developers and was absolutely necessary for debugging ActionScript “back in the day”. But today this is still a very valuable debugging technique, especially if you are debugging a timing issue.

To do this you need to create a file called "mm.cfg" in the following location:

/Library/Application Support/Macromedia

Windows 2000/XP:
C:\Documents and Settings\username\mm.cfg

Windows 7:

Add the following lines to the file:

Load your swf with trace statements and in the following location you should (eventually) see a file called “flashlog.txt”:

/Users/yourname/Library/Preferences/Macromedia/Flash Player/Logs

Windows 2000/XP:
C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs

Windows 7:
C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs

For up-to-date locations of the mm.cfg, the log file, and other properties you can set in the mm.cfg file see this page from Adobe.


”’Not Working?”’

If you are having problems getting the player to write to flashlog.txt, make sure you have the debug version of the player installed, you can get Flash Player versions here:

Check your "mm.cfg" file: make sure it is in the correct place and if you created it with TextEdit for example, make sure it has no RTF stuff in it (open it with "vi" in a terminal window).

Helpful tip:

You can also watch the log file via the Mac OS X Console app. Windows users can search Google for a utility called “WinTail” which gives you “tail -f” functionality in a command window.