我正在嘗試使用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