为什么Firefox不能跟踪到Ubuntu中的flashlog.txt?

时间:2013-06-16 09:03:35

标签: debugging firefox ubuntu actionscript trace

好的我和我的朋友即将试图配置Adobe Flex SDK以便在我们的Ubuntu机器上正常工作。我们已经安装并配置了SDK来编译ActionScript文件,但是当我们在Firefox中执行已编译的swf时,FlashPlayer调试器无法将跟踪或错误记录到flashlog.txt。

我们在Firefox中安装了Flash Player Debugger,在我们的主目录中安装了mm.cfg文件。

指向我们尝试过的内容:

  1. http://www.arulraj.net/2010/08/flash-player-debugger-in-ubuntu.html

  2. http://www.gregoryprogrammer.com/2012/12/actionscript-3-code-compilation-in-inux/

  3. http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html

  4. http://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.html

  5. 我们正在使用的版本:

    Firefox浏览器18.0.2

    Ubuntu OS 12.0.4

    最新的Flex SDK

1 个答案:

答案 0 :(得分:1)

我注意到你没有提到使用-debug标志进行编译。以下是我采取的步骤:

  • 确保您使用的是播放器的调试版本(点击flashplayerversion.com进行检查)。这在浏览器中越来越棘手,尤其是在64位Linux中。如今Firefox可能比Chrome更容易。您还可以尝试位于here的调试内容投影仪(也称为独立播放器)。

  • 有一个带有TraceOutputFileEnable=1的〜/ mm.cfg文件。这是我的:

> cat ~/mm.cfg 
ErrorReportingEnable=1
TraceOutputFileEnable=1
  • 在您知道将要执行的地方使用跟踪方法:
> cat Main.as
package {
  import flash.display.Sprite;
  public class Main extends Sprite {
    public function Main() {
      trace("Hello flashlog.txt");
    }
  }
}
  • 使用-debug选项编译SWF:
  mxmlc -debug Main.as
  • 我将使用内容投影仪进行测试:
>flashplayerdebugger Main.swf &
>tail ~/.macromedia/Flash_Player/Logs/flashlog.txt
Hello flashlog.txt

或者打开一个专用终端来跟踪日志文件:

>tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt