Flex trace 日志

在开发flex的web项目是,我们使用flash player插件来播放flash产品。有些变量(例如:触发某些事件)我们无法在debug环境中跟踪,这时候我们就要使用tracelog来调试代码了。设置调试代码的方法如下。


1、配置flash player(mm.cfg文件):

   文件位置:
  
Windows 2000/XP C:\Documents and Settings\<username>
Windows Vista/7 C:\Users\<username>


文件内容:
TraceOutputFileEnable 1(0:不允许、1:允许)
ErrorReportingEnable 1(0:不允许、1:允许)


2、在flex4(或者)代码中写入如下语句:
trace("This's an example of outputing logs.");


3、查看日志:
在以下地址查看输出的日志(文件名:flashlog.txt):
  
Windows 2000/XP C:\Documents and Settings\<username>\Application Data\Macromedia\Flash Player\Logs
Windows Vista/7 C:\Users\<username>\AppData\Roaming\Macromedia\Flash Player\Logs


4、原文参考:
http://www.troubleshootingwiki.org/Debugging_Flex

你可能感兴趣的:(Web,debug,Flex,Flash,tracelog)