) Debugging Flex applications with mm. cfg and flashlog.txt

Source: Internet
Author: User

When working with Flex applications, it may useful to see the output fromtrace()Function. Well, the good news is that if you have the debug version of the Flash Player installed, it is really easy to redirecttrace()Output to an external file which can you browse using any text editor.

There are lots of excellent online resources for this already, but here is a brief run-down...

 

Create a file named "Mm. cfg" in one of the following locations:

  • Windows;C:/Documents and Settings/username/mm.cfg
  • OSX;/Library/Application Support/Macromedia/mm.cfg
  • Linux;home/username/mm.cfg

Open the newly created mm. cfg file in a text editor and add the following text:

ErrorReportingEnable=1TraceOutputFileEnable=1

The flashlog.txt file will be created in the following location:

  • Windows;C:/Documents and Settings/username/Application Data/Macromedia/Flash Player/Logs/flashlog.txt
  • OSX;/Users/username/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
  • Linux;home/username/Macromedia/Flash_Player/Logs/flashlog.txt

For more information see "logging", "logging the debugger version of Flash Player" and "locking the debugger version of Flash Player to record trace () output" in the flex 2.0.1 documentation.

You can also check out the "debugging client-side code in flex Applications" article in the Adobe Flex Developer Center (although note that the article was written March, 15 2004, and some information may not be 100% accurate anymore ).

If you are still having problems, check out the following Adobe character te on "Troubleshooting Tips for flashlog.txt not being generated ".

For more information, check out Mark Walters's excellent post over on digitalflipbook.com, "trace from the browser, using standard trace ()".

Frequently Asked Questions

Q: How do I know if I have the debug version of the Flash Player already installed?
A: finding your Flash Player version, and whether or not your Flash Player is a debug version is done by checkingversionAndisDebuggerProperties of the Flash. system. Capabilities class.

 

Q: Where can I download a debug version of the Flash Player if I don't have one already installed?
A: You can download nightly builds of the Flex 3 SDK from the "Adobe Labs-Flex 3 software development kit" page. simply download and extract a zip file, and go to the following directory: “flex_sdk_3.zip/runtimes/player ". in this folder you shoshould find three subfolders: "lnx", "Mac", and "Win" for the Linux, Macintosh and Windows operating systems respectively. navigate to your appropriate folder /Operating system and install away!

If you have the flex builder 3 Public Beta installed, you can navigate to the following directory on a Windows system to find the various Flash Player versions (standalone, ActiveX, Mozilla): "C: /program files/Adobe/flex builder 3/sdks/moxie/runtimes/player/win ". if you don't have the flex builder 3 beta installed, you can download it from "Adobe Labs-Adobe Flex builder 3 Public Beta ".

These folder names/locations cocould change with any future beta/nightly build, but I'll try and keep them updated. if you notice they are no longer correct, leave a message in the comments and I will investigate/reply.

Hopefully that about covers it. Until next time, be safe and happy flexing!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.