我正在尝试使用ANT和Flash Builder 4进行编译和调试。编译是很容易的部分,但难以让调试器工作。Flash Builder(Flex)ANT构建和调试
我想使用ANT来调试Flash Builder中的SWF文件,以便断点,控制台跟踪和所有操作都能正常工作。
到目前为止我的脚本。构建* .as到* .swf并从bin-debug移动到部署文件夹。 如何为创建的SWF启动Flash Builder调试器?
<target name="Compile level 1">
<antcall target="compile flex file">
<param name="file" value="GameOffice"/>
</antcall>
<antcall target="open player">
<param name="file" value="GameOffice.swf"/>
</antcall>
</target>
<target name="compile flex file">
<mxmlc file="${SRC_DIR}/${file}.as" output="${BUILD_DIR}/${file}.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="true"
incremental="true"
static-link-runtime-shared-libraries="true"
show-actionscript-warnings="true"
failonerror="true"
debug="true"
optimize="false">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<source-path path-element="${FLEX_HOME}/frameworks" />
<compiler.include-libraries dir="${basedir}/libs" append="true">
<include name="HelloThereLibGames.swc" />
<include name="HelloThereLibStructure.swc" />
<include name="HelloThereLibUtils.swc" />
</compiler.include-libraries>
<metadata description="Hello There Production">
<contributor name="Fredrick Bäcker" />
</metadata>
</mxmlc>
<copy todir="${DEPLOY_DIR}" file="${BUILD_DIR}/${file}.swf"/>
</target>
我得到的主要问题是Flex在使用SVN时会忽略bin-debug文件夹。使用FLA文件内部的大型艺术指导团队,复制使用XML文件的作家,游戏设计师和关卡设计师。当然还有实际代码中的开发人员。所有这些用户都需要访问最新的bin-debug文件,但他们不需要使用CPU很重的开发工具。 所以这就是为什么我们使用另一个文件夹进行部署,每个人都可以发布swf文件并直接在xml文件中工作。这里的问题是需要bin-debug中的部署文件的开发人员。 – Backer 2011-01-08 13:53:29
因此,要么将输出目录设置为不是bin-debug,要么将bin-debug从eclipse(flex builder)中使用的任何svn插件的忽略列表中除去,或者使用命令行或您最喜欢的方式从库中执行提交svn客户端? – NielsBjerg 2011-02-09 21:39:15