Accessibility

TechNote (Archived)

Troubleshooting tips for flashlog.txt not being generated

After the Macromedia Flash debug player is installed, Macromedia Flex will write error messages into a log file in the homedirectory on the client machine. By default, the log file is named flashlog.txt and is located in C:\ on Windows 2000 or C:\Documents and Settings\userName on Windows XP. Each time you start an application, the existing log file is deleted and a new one is generated.

If the flashlog.txt file is not generated, there are configuration issues that need to be fixed. The following is a list of troubleshooting steps to resolve the problem.

  1. Install the Flash Debug Player correctly.

    The following versions of the Flash Debug Player support the error-reporting mechanism:
    Windows versions
    Windows ActiveX control version
    Windows Netscape/Mozilla Plugin versions

    The first thing to check is to make sure the Debug Player is installed correctly. See the Installing Flash Player documentation for details.

    Note: Sometimes people install more than one browser on their machine, such as IE and Netscape, or IE and Opera. You can configure the Debug Player with one browser for debugging Flex only, and use the other for your regular browsing. This is a good way to make the process more efficient. In this case, you need to make sure you request the MXML page using the browser you configured with the Debug Player, otherwise, the flashlog.txt will not be generated because the Debug Player was not configured with that browser.
  2. Configure the mm.cfg file.

    Make sure you have copied the mm.cfg file from your flex_install_dir/bin directory to the client machine's home directory.

    Two Windows environment variables define the location of "home directory":
    HOMEDRIVE specifies the drive letter of the path to the home directory. In most Windows systems, the default value is C:, the primary hard drive.
    HOMEPATH specifies the path to the home directory, relative to HOMEDRIVE. On Windows 2000, the default is \. On Windows XP, the default is \Documents and Settings\userName where userName is your system user name. Therefore, by default, the home directory is C:\ on Windows 2000 or C:\Documents and Settings\userName on Windows XP. This may not be the case in your environment, so it is important to verify your home directory.

    To check your home directory, use the following command:
    echo %HOMEDRIVE%%HOMEPATH%

    Your mm.cfg file must be under that home directory on the client machine. You must also have Read/Write access to the home directory. For example, if your drive C is mapped to H:, then make sure you have write access to drive H and put the mm.cfg file under your H drive's home directory.
  3. Verify the output file name and location.

    By default, the output file name is flashlog.txt and is generated under your home directory. Make sure you are looking for the file in the correct location.

    Note: You can change the location and name of the output log file by setting the following in mm.cfg:

    TraceOutputFileName=full_path\trace_file_name

    For example:
    TraceOutputFileName=H:\trace\myflashlog.txt
  4. Set production-mode to false in flex-config.xml.

    To log errors to the log file or console, you must set<production-mode> to false in flex-config.xml. If production mode is enabled, Flex does not generate log entries for errors.
  5. Edit debug settings.

    Flex provides you with control over the output of warning and debug messages. You can override some of the debugging settings to meet your needs. You may want to double-check those settings to ensure that debugging is enabled for the areas you'd like to show thedebug message. You can see more details in Developing Flex Applications in LiveDocs format.

If the flashlog.txt file is generated but does not include the trace information in the file, the following steps must be taken:

  1. Verify settings in mm.cfg:

    In the mm.cfg file, you need to set the following to log the error and trace messages:
     ErrorReportingEnable=1 TraceOutputFileEnable=1 
    If they are set as 0, then no error or trace messages will be logged.
  2. Set optimize to false in flex-config.xml.

    When the <optimize> attribute is set totrue, it reduces the size of the Flex application's SWF by 10-15% by compressing the ActionScript code and removing all the trace statements. If you have optimize set totrue, then you will not see the trace statements in the output file. To see the trace during development, you need to set <optimize>false</optimize> in the flex-config.xml file.


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_19323
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected:

flex