且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

启用控制台输出EXEC Ant任务

更新时间:2023-12-05 12:11:22

为了从Flash得到的痕迹,你需要运行Flash调试器(FDB)。幸运的是,它带有的Flex SDK。 (http://www.adobe.com/devnet/flex/flex-sdk-download.html)

In order to get traces from Flash you need to run the Flash Debugger (FDB). Luckily it comes with the Flex SDK. (http://www.adobe.com/devnet/flex/flex-sdk-download.html)

这是我使用Ant来启动Flash调试器,而这又是因为目标是一个HTML文件将启动您的浏览器采样任务。如果目标是一个SWF文件,然后它会在一个独立的窗口FDB只需运行。

This is a sample task that I am using in Ant to launch the Flash Debugger, which in turn will launch your browser because the target is an HTML file. If the target was a SWF file then it would simply run in a standalone FDB window.

  <target name="launch-browser">
    <echo file="${basedir}/build/.fdbinit">run file://${outputdir}/swf/index.html
continue</echo>
    <exec executable="${sdk.flex}bin/fdb" spawn="false" dir="build">
      <arg line="-unit"/>
    </exec>
  </target>

这个任务将首先编写一个名为.fdbinit文件,其中包含了FDB启动时将运行命令。然后将它与-unit FDB开始,以确保它保持正确连接到Ant构建器(我其实不是这个100%,但它是必需的)。这会给你的浏览器,并痕迹(也实际调试器的控制)的终端窗口。

This task will first write a file called .fdbinit which contains the commands that fdb will run when launched. Then it starts fdb with -unit to make sure it stays properly attached to the ant builder (I'm actually not 100% on this but it is required). This will give you the browser, and the traces (also the actual debugger control) in your terminal window.

-

另外,使用原来的macrodef,如果你有你的机器上安装Flash调试播放器;您可以配置您的Flash播放器编辑您的mm.cfg文件中,并设置TraceOutputFileEnable和TraceOutputFileName选项写的痕迹到一个文件中。

Alternatively, using your original macrodef, if you have the Flash Debug Player installed on your machine ; you can configure your Flash Player to write the traces to a file by editing your mm.cfg file and setting the TraceOutputFileEnable and TraceOutputFileName options.

这个文件在/库/ Application Support发现/ Macromedia公司的OSX。

This file is found in /Library/Application Support/Macromedia on OSX.

有关的mm.cfg相关的和额外的文档:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html

Relevant and additional docs for mm.cfg: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html