
485 CHAPTER 23 Debugging and testing
23.1 Debugging
You can use debugging at multiple levels. We’ll review each approach, starting with
the easiest.
23.1.1 Using the Flash Debug Player
When you install Flex Builder, it automatically installs the Flash Debug Player for you;
this Debug Player allows for diagnostic logging, and you can connect external tools to
it for debugging purposes.
You can download the latest player at Adobe’s website via http://www.adobe.com/
support/flashplayer/downloads.html. Look in the Debugger Versions section.
To test which version you currently have, visit http://kb.adobe.com/selfservice/
viewContent.do?externalId=tn_15507. Be sure the Debug Player item says Yes.
You should already have the Debug Player, but sometimes other software you install
may try to install the production version of the Flash Player as part of its installation. In
any case, if you’re not running the Debug Player, go ahead and get it installed.
Once you’ve verified that you have the Debug Player, you need to configure logging.
23.1.2 Configuring logging
To get logging going, you need to set up the Flash Debug Player’s configuration file. If
there isn’t one, create a text file called mm.cfg and place it in the appropriate direc-
tory based on your operating system (see table 23.1).
Inside this file are three configuration properties to define, as listed in table 23.2.
Table 23.1 Location of the Flash Player’s configuration file
Operating system Path
MAC OS X /Library/Application Support/Macromedia
Windows 95/98/ME %HOMEDRIVE%\%HOMEPATH%
Windows 2000/XP C:\Documents and Settings\[username]
Windows Vista C:\Users\[username]
Linux /home/username
Table 23.2 Flash Player’s configuration-file settings
Configuration property Type Description
TraceOutputFileEnable Boolean 0 for false (default), 1 for true. Turns
logging on or off.
ErrorReportingEnable Boolean 0 for false (default), 1 for true. Turns
logging of error messages on or off.
Komentáře k této Příručce