Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse 为exec ANT任务启用控制台输出_Eclipse_Ant_Exec - Fatal编程技术网

Eclipse 为exec ANT任务启用控制台输出

Eclipse 为exec ANT任务启用控制台输出,eclipse,ant,exec,Eclipse,Ant,Exec,在eclipse中,我使用以下宏定义启动了一个html页面,其中嵌入了ANT的swf: <macrodef name="runhtml"> <attribute name="url" /> <attribute name="browser" default="${app.browser.firefox}" /> <sequential> <exec executable="open"

在eclipse中,我使用以下宏定义启动了一个html页面,其中嵌入了ANT的swf:

<macrodef name="runhtml">
   <attribute name="url" />
   <attribute name="browser" default="${app.browser.firefox}" />
   <sequential>
      <exec
         executable="open"
         vmlauncher="true"
         spawn="false"
         failonerror="true">
         <arg line="-a '@{browser}'" />
         <arg line="@{url}" />
      </exec>
   </sequential>
</macrodef>


尽管swf包含跟踪,但我在控制台中没有从它们那里得到任何输出。是什么原因造成的?

我也有同样的问题。错误消息会回显到控制台,但信息消息不会回显。到目前为止,我找到的唯一解决方案是将自己的echo添加到macrodef中。

为了从Flash中获取跟踪,您需要运行Flash调试器(FDB)。幸运的是,它附带了FlexSDK。(http://www.adobe.com/devnet/flex/flex-sdk-download.html)

这是我在Ant中使用的一个示例任务,用于启动Flash调试器,而Flash调试器将启动浏览器,因为目标是HTML文件。如果目标是SWF文件,那么它只需在独立的FDB窗口中运行

  <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>

运行文件://${outputdir}/swf/index.html
持续

要使其自动化,唯一的方法似乎是使用Benoit所描述的.fbinit,但将每个命令放在不同的行上:

    <echo file="${BUILD.dir}/.fdbinit">run file://${outputdir}/swf/index.html
    continue</echo>
运行文件://${outputdir}/swf/index.html
持续

回答得很好。可惜不是2年前我还在使用Flash;)