Flex Builder + Ant Build + Debug + Console Output
Posted by Dennis on Apr 24, 2008 in AIR, ActionScript, Flex • 4 comments
Flex Builder, as opposed to Visual Studio, doesn’t have post-build scripts that allow you to easily copy assets to the build folder.
If you need to do this Ant is a good alternative. There can be problems connecting the Ant build process to the debugger though.
The solution to this problem is to add a builder to the project (in Flex Builder):
- Right-click on the Flex project and choose “Properties”
- Click on “Builders” in the left panel
- Click on the “New…” button on the right
- Choose “Ant Builder” from the “Choose configuration type” window
- Type “Ant Builder” in the “Name” field
- Locate the build.xml in the “Main” tab
- Go to the “Build Options” tab and check the “Allocate Console” option
- Click “OK”
- Uncheck “Flex” in the Builders dialogue and make sure “Ant Builder” is checked
- Press F11 to build & debug your project …
That’s all there is to it …




Thank you very much. I couldn’t use your advice at first, because I didn’t have Ant installed in Flex Builder 3 yet. The post here: http://www.judahfrangipane.com/blog/?p=193
helped me get Ant installed. Now I see the Ant Builder you’re speaking of. thanks!
If i dont remember wrong, there are some third party materials, i mean dll projetcs which makes it avaliable in visual studio, in asp.net probably…
Tutorial yang bagus, Oom Dennis! Terima kasih
Thanks for this post, it is very useful.
I use this method to compile with Ant and debug the resulting files in Flash Builder. However, it when I want to see a compile time error I compile by clicking on an ant target in the Ant window - this causes it to run the internal builder script as well as the ant target clicked - does anyone else have this problem?
Also I often have problem making the Builder script accept a launch configuration made through the Flash Builder GUI and resort to editing the xml files. The resulting error is: Errors running builder ‘Integrated External Tool Builder’ The builder launch configuration could not be found.
But I think this is the result of an error in actually making a launch configuration that works. Directly making the xml files works fine.