Central Logo Macromedia Central
Debug Player Instructions

The Macromedia Central Debug Player

This document describes how to install and use the Central Debug Player executable on Windows or Macintosh.

Note: The Central Debug Player has not been fully tested by Central QA.

Description:

The Central Debug Player helps you collect debug information when running Central applications. The debug player writes warnings and errors (including undefined variables and functions, case sensitivity problems, and security sandbox warnings) to a text file. You can also use trace() statements to send additional debug messages to the file. The debug player is similar to the Flash Player debug version and the Flex debug player.

Output:

The output text file (named "flashlog.txt" by default) contains statements about all running Central applications. So, the file will contain various warnings and errors that are not specific to the application you are testing. Even with only the default Central applications installed, the Central Debug Player will write several warnings to the file about those default applications.

Note: Other desktop applications may embed the Flash player, which can cause additional trace statements and warnings to be listed in a trace file.

To organize the output file contents, write a trace statement to add some indicating prefix to the warnings and errors specific to your application. For example, write a trace method such as trace("==MyApp=="+ msg) to generate warning messages in the output file that begin with ==MyApp==.

Installation:

1. Rename your central.exe file to something like "central_bak.exe".

You can find this file in WinXP & 2K:
C:\Documents and Settings\[username]\Application Data\Macromedia\Flash Player\www.macromedia.com\bin\central\

And for Macintosh:
[Macintosh HD]/Users/[username]/Library/Preferences/Macromedia/Flash Player/www.macromedia.com/bin/central/

2. Copy the Central Debug Player executable file to the above location.

You can find the debug player in the Central SDK at /Utilities/CentralDebugPlayer. The Windows executable file is named Central.exe. The Macintosh executable file is named CentralDebuggerRel.

3. Create an mm.cfg file in one of the following directories:

WinXP & 2K:
C:\Documents and Settings\[username]\

Macintosh:
[Macintosh HD]/Library/Application Support/Macromedia/

If you have used any version of the Flash Debug Player or the Flex Debug Player in the past, you may already see an mm.cfg file in this directory. Otherwise you can copy the sample mm.cfg file from the /Utilities/CentralDebugPlayer folder in the SDK and place it in one of the folders named above.

4. The mm.cfg file should at least include the following settings:

ErrorReportingEnable=1
TraceOutputFileEnable=1
MaxWarnings=100

Note: By default, the Central Debug Player limits the number of warning and error messages written to the flashlog.txt file to 100 for each SWF invocation. To reset the default value, use the property MaxWarnings in the mm.cfg. For example, to set the maximum number of warnings to 500, set MaxWarnings=500 in the mm.cfg file. Setting MaxWarnings=0 allows an unlimited number of error messages to be written to the flashlog.txt.

5. Next time you run Central, a file named flashlog.txt will be created in the same directory where you placed your mm.cfg file. This file contains all of the debug and trace statements that are output from Central and any Central applications that you run.

mm.cfg file settings:

The table below describes some useful settings that you can specify in your mm.cfg file.

Property Description
ErrorReportingEnable

Set ErrorReportingEnable to 1 to enable error reporting. Disable it by setting it to 0. Error reporting is disabled by default.

MaxWarnings

Set MaxWarnings to override the default message limit. For example, you can set it to 500 to capture 500 error messages.

By default, Flash Debug Player logs 100 error messages to the log file. After 100 messages, Flash Debug Player writes a message to the file stating that further error messages will be suppressed.

Set the MaxWarnings to 0 to remove the limit so that all error messages are recorded.

TraceOutputFileEnable

Set TraceOutputFileEnable to 1 to enable Flash Player to write error messages to the log file. Disable it by setting TraceOutputFileEnable to 0.

TraceOutputFileName

Set TraceOutputFileName to override the default name and location of the log file by specifying a new location and name in the form:

TraceOutputFileName=<fully qualified path/filename> 

By default, Flash Player writes error messages to a file named flashlog.txt located in the directory specified by the environment variables HOMEDRIVE and HOMEPATH.

To change the location of the output text file:

By default the player writes all debug information to a file named flashlog.txt. This file is normally stored in the same directory location as the mm.cfg file.

You can set the location of the flashlog.txt output file by editing the TraceOutputFileName value in the mm.cfg file. Make sure you specify an existing directory path, the debug player will not create a directory that does not already exist. If the debug player tries to write the log file to a directory that does not exist, the log creation will fail without any notification.

For example, add the following line to your mm.cfg file:

WinXP or 2k:
TraceOutputFileName=C:\Documents and Settings\<username>\debug\flashlog.txt

Macintosh:
TraceOutputFileName=Macintosh HD:Users:<username>:debug:flashlog.txt

Note: You must use colons (":") rather than slashes ("/") as path separators on Macintosh, and you have to give the full path, including the volume name (usually "Macintosh HD").

To troubleshoot the flashlog.txt file generation and settings:

Macromedia Flex provides a similar debug player. For information about troubleshooting debug player issues, please see the technote at http://www.macromedia.com/support/flex/ts/documents/troubleshoot_flashlog.htm.


© 2003-2004 Macromedia, Inc. All rights reserved.