Using the debugger version of Flash Player

The debugger version of Flash Player is a tool for development and testing. Like the standard version of Flash Player 9, it runs SWF files in a browser or on the desktop in a stand-alone player. Unlike Flash Player, the debugger version of Flash Player enables you to do the following:

NOTE

 

Any client running the debugger version of Flash Player can view your application's trace() statements and other log messages unless you disable them. For more information, see Suppressing debug output.

The debugger version of Flash Player lets you take advantage of the client-side logging utilities such as the trace() method and the Logging API. You are not required to run the debugger version of Flash Player to log compiler and web-tier messages because these logging mechanisms do not require a player.

In nearly all respects, the debugger version of Flash Player appears to be the same as the standard version of Flash Player. To determine whether or not you are running the debugger version of Flash Player, use the instructions in Determining Flash Player version in Flex.

The debugger version of Flash Player comes in ActiveX, Plug-in, and stand-alone versions for Microsoft Internet Explorer, Netscape-based browsers, and desktop applications, respectively. You can find the debugger version of Flash Player installers in the following locations:

Uninstall your current Flash Player before you install the debugger version of Flash Player. For information on installing the debugger version of Flash Player, see the Flex installation instructions.

You can enable or disable trace logging, change the location of the trace output, and perform other configuration tasks for the debugger version of Flash Player. For more information, see Configuring the debugger version of Flash Player.

Subtopics

Configuring the debugger version of Flash Player
Determining Flash Player version in Flex

Configuring the debugger version of Flash Player

You use the settings in the mm.cfg text file to configure the debugger version of Flash Player. You must create this file when you first configure the debugger version of Flash Player. The location of this file depends on your operating system. The following table shows where to create the mm.cfg file for several operating systems:

Operating system

Location of mm.cfg file

Mac OS X

MacHD:Library:Application Support:macromedia:mm.cfg

Microsoft Windows XP

C:\Documents and Settings\user_name\mm.cfg

Windows 2000

C:\mm.cfg

Linux

home/user_name/mm.cfg

TIP

 

In Windows, the location of the mm.cfg file is determined by the HOMEDRIVE and HOMEPATH environment variables. The HOMEDRIVE variable specifies the drive letter of the path to the home directory. On most Microsoft Windows systems, the default value is C:, the primary hard disk drive. The HOMEPATH variable specifies the path to the home directory, relative to HOMEDRIVE.

In Microsoft Windows 2000, the default location is \.

In Microsoft Windows XP, the default location is \Documents and Settings\user_name, where user_name is your system user name.

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 ErrorReportingEnable property to 1 to enable the debugger version of Flash Player to write error messages to the log file. To disable logging of error messages, set the ErrorReportingEnable property to 0.

The default value is 0.

MaxWarnings

Sets the number of warnings to log before stopping.

The default value of the MaxWarnings property is 100. After 100 messages, the debugger version of Flash Player writes a message to the file stating that further error messages will be suppressed.

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

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

TraceOutputFileEnable

Enables trace logging.

Sets TraceOutputFileEnable to 1 to enable the debugger version of Flash Player to write trace messages to the log file. Disables trace logging by setting the TraceOutputFileEnable property to 0.

The default value is 0.

TraceOutputFileName

Note: Beginning with the Flash Player 9 Update, Flash Player ignores the TraceOutputFileName property.

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 sTraceOutputFileName to override the default name and location of the log file by specifying a new location and name in the following form: On Mac OS X, use colons to separate directories in the TraceOutputFileName path rather than slashes.

TraceOutputFileName=<fully qualified path/filename>

The following sample mm.cfg file enables error reporting and trace logging:

ErrorReportingEnable=1
TraceOutputFileEnable=1

Log file location

The default log file location changed between the initial Flash Player 9 release and the Flash Player 9 Update. In the initial Flash Player 9 release, the default location is the same directory as the mm.cfg file and you can update the log file location and name through the TraceOutputFileName property. Beginning with the Flash Player 9 Update, you cannot modify the log file location or name and the log file location has changed, as follows:

Windows C:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs

Macintosh Users/user_name/Library/Preferences/Macromedia/Flash Player/Logs/

Linux home/user_name/macromedia/Flash_Player/Logs/flashlog.txt

Determining Flash Player version in Flex

To determine which version of Flash Player you are currently using--the standard version or the debugger version--you can use the Capabilities class. This class contains information about Flash Player and the system that it is currently operating on. To determine if you are using the debugger version of Flash Player, you can use the isDebugger property of that class. This property returns a Boolean value: the value is true if the current player is the debugger version of Flash Player and false if it is not.

The following example uses the playerType, version, and isDebugger properties of the Capabilities class to display information about the Player:

<?xml version="1.0"?>
<!-- logging/CheckDebugger.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
        import flash.system.Capabilities;

        private function reportVersion():String {
            if (Capabilities.isDebugger) {
                return "Debugger version of Flash Player";
            } else {
                return "Flash Player";
            }
        }
        private function reportType():String {
            return Capabilities.playerType + " (" + Capabilities.version + ")";
        }
    ]]></mx:Script>
    <mx:Label text="{reportVersion()}"/>
    <mx:Label text="{reportType()}"/>
</mx:Application>

Other properties of the Capabilities class include hasPrinting, os, and language.


LiveCycle Data Services ES 2.5

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/logging_3.html