I'm trying to use ANT with Flash Builder 4 to compile and debug.
The compiling is the easy part but having trouble to get the debugger to work.
I want to use ANT to Debug SWF file inside Flash Builder, so that breakpoints, console traces and everything works as it should.
My script so far. Builds The *.as to *.swf and moves from bin-debug to deploy folder. How can I start a Flash Builder Debugger for the created SWF?
<!-- this opens the file in Flash Debug Player, but Flash Builder IDE doesn't understand this? -->
<exec executable="open" vmlauncher="true" spawn="false" failonerror="true">
<arg line="-a '${flashPlayer}' '${DEPLOY_DIR}/${file}'" />
</exec>
<!-- to run, compiles and then open -->
<targetname="Compile level 1">
<antcalltarget="compile flex file">
<paramname="file"value="GameOffice"/>
</antcall>
<antcalltarget="open player">
<paramname="file"value="GameOffice.swf"/>
</antcall>
</target>
<!-- compile *.as to *.swf, move from bin-debug to deploy (to fix Flex SVN issues -->
<targetname="compile flex file">
<mxmlcfile="${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-configfilename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<source-pathpath-element="${FLEX_HOME}/frameworks"/>
<compiler.include-librariesdir="${basedir}/libs"append="true">
<includename="HelloThereLibGames.swc"/>
<includename="HelloThereLibStructure.swc"/>
<includename="HelloThereLibUtils.swc"/>
</compiler.include-libraries>
<metadatadescription="Hello There Production">
<contributorname="Fredrick Bäcker"/>
</metadata>
</mxmlc>
<copytodir="${DEPLOY_DIR}"file="${BUILD_DIR}/${file}.swf"/>
</target>