How to debug Flash IDE AIR 3.4 Desktop App with FlashDevelop?

Tag: debugging , air , flashdevelop , flash-cs6 Author: lvjiayou Date: 2012-11-19

Debugging a normal Flash IDE project from FlashDevelop is as simple as clicking the debug/play button.

Debugging an AIR Flash IDE project from FlashDevelop isn't working. What settings might I need to change to have it trigger Flash to public the AIR or AIRI file and run it and connect to it for debugging?

Best Answer

I figured it out finally.

The trick is to set FlashDevelop's project properties > output tab > test project setting to "Run Custom Command". Click edit and enter the following string:

$(FlexSDK)\bin\adl.exe;$(ProjectName)-app.xml $(ProjectName).app

ADL.exe is the "AIR Debug Launcher". Makes sense.

In order for that command to work and avoid seeing a quickly disappearing command window complaining that "content not found", your Flash IDE AIR project must actually create the "$(ProjectName)-app.xml" file and the "$(ProjectName).app" folder that houses all the app's files. To get it to do that, you need to do the following:

In the "AIR Settings" in Flash, I set the "Output as" option to "Application with runtim embedded". The option is actually disabled until you go to the signature tab, select "Use a code signing certificate" and then click "create" to create a self-signed certificate. If you don't use a code signing certificate, then you won't be able to adjust the "output as" settings, because you'd be stuck with the "Prepare an AIR Intermediate (AIRI) file that will be signed later option. So just sign the app, and then you can pick the output as option that will generate the "$(ProjectName).app" folder.

Shame, shame, shame, shame, shame on Adobe for failing to model AIR after Flash's simple single-file/run-anywhere SWF format that made it so successful. Instead, running an AIR app is a convoluted process involving AIRI, xml, exe, and swf files, .app folders, and installation processes, and runtime permissions issues.