配置mm.cfg以查看Flash Log输出

Categories: Flex; Tagged with: ; @ August 15th, 2010 0:11

需求: 在非Debug时查看flash的log/Trace信息

解决: 创建或配置mm.cfg, 查看falshlog.txt

前置条件: Debug版本的FlashPlayer

具体步骤:

1. 设置mm.cfg:

检查mm.cfg配置文件:

  • Windows xp/NT:C:\Documents and Settings\username\mm.cfg
  • Winidows Vista/7: C:\users\user\mm.cfg

如果没有文件, 则先创建之. 编辑或新增如下内容:

ErrorReportingEnable=1
TraceOutputFileEnable=1

2. Flash运行后查看Log信息:

Window Vista/7: C:\Users\Li Guoliang\AppData\Roaming\Macromedia\Flash Player\Logs

如:

INFO  MultiSpeedTester – *****************
开始测试: Name: TEST1, URL: http://localhost/speedtest/speedtest/speedtest.php
INFO        CanvasMain – 正在测试: Name: TEST1, URL: http://localhost/speedtest/speedtest/speedtest.php
INFO  MultiSpeedTester – 单个开始测试: Name: TEST1, URL: http://localhost/speedtest/speedtest/speedtest.php
INFO       SpeedTester – 正在测试下行速度 …
INFO       SpeedTester – Download testing started
INFO       SpeedTester – Download testing size determined: 1048576 bytes
INFO       SpeedTester – Download testing finished. Speed: 30117.6 KBytes/s [or 240941.2 Kbits/s] – bytes: 1048576, seconds: 0.0
INFO       SpeedTester – 下行速度为30117.6 KBytes/s, 等级:优秀
INFO       SpeedTester – 上行速度为-1.0 KBytes/s, 等级:未知

Trace及INFO信息(本该打印在Debug Console里的内容)

@See: http://blog.flexexamples.com/2007/08/26/debugging-flex-applications-with-mmcfg-and-flashlogtxt/

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.