Flash debug player is different from the standard Flash Player. It includes additional functionality that the standard player does not have such as:
- Logs trace() statements (logging in the Flash debug player is turned off by default)
- Works with Flex Builder Debugging Perspective
- Works with the Flex Builder 3 Profiler
The debug version of Flash Player can be configured by the mm.cfg text file in the system. You can use any text editor to create it. The following table lists the properties that you can set in the mm.cfg file:
Property | Description |
ErrorReportingEnable | Enables the logging of error messages. Set the The default value is 0. |
MaxWarnings | Sets the number of warnings to log before stopping. The default value of the Set the Set the |
TraceOutputFileEnable | Enables trace logging. Set The default value is 0. |
TraceOutputFileName | Note: Beginning with the Flash Player 9 Update, Flash Player ignores the Sets the location of the log file. By default, the debugger version of Flash Player writes error messages to a file named flashlog.txt, located in the same directory in which the mm.cfg file is located. Set TraceOutputFileName=<fully qualified path/filename> |
For example, the following sample mm.cfg file enables error reporting and trace logging:
The location of mm.cfg and its log file (i.e., flashlog.txt) is determined by OS. However, you can update the log file location and name through theErrorReportingEnable=1
TraceOutputFileEnable=1
TraceOutputFileName
property.The following table shows where to create mm.cfg for several operating systems.
Operating System | Create mm.cfg file in this directory |
Macintosh OS X | MacHD:Library:Application Support:macromedia: |
Microsoft Windows Vista | C:\Users\user_name\ |
Microsoft Windows 2000/XP | C:\Documents and Settings\user_name\ |
Microsoft Windows 95/98/ME | %HOMEDRIVE%\%HOMEPATH%\ |
Linux | /home/user_name |
The following table shows the default flashlog.txt file location:
Operating System | Location of flashlog.txt |
Macintosh OS X | MacHD:Users:user_name:Library:Preferences:Macromedia:Flash Player:Logs:flashlog.txt |
Microsoft Windows Vista | C:\Users\user_name\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txt |
Windows 95/98/ME/2000/XP | C:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs\flashlog.txt |
Linux | /home/user_name/.macromedia/Flash_Player/Logs/flashlog.txt |
Being a text file, there are several ways to read from the log file:
- Notepad or its equivalent
- Tail or some variant
- FlashTracer
- Using the tail view in Aptana
No comments:
Post a Comment