I've been trying to figure out a way to interactively debug an Adobe AIR JavaScript application. There does not appear to be an IDE that supports this (is there?).
However, there is fdb, which according to this, you can use to debug Adobe AIR apps. It says the following:
If an AIR application is SWF-based, the debugger only controls the execution of ActionScript code. If the AIR application is HTML-based, then the debugger only controls the execution of JavaScript code.
That sounds pretty unequivocally like JavaScript debugging is supported via fdb.
So, I followed the instructions. I'm on Windows 7, and I just downloaded the AIR SDK today (AIR 3.9.0). More information on fdb commands are available here.
So I followed the instructions on debugging an AIR app with fdb. First, I launched fdb in a terminal window. It starts up fine. I enter "run" and it says "Waiting for Player to connect".
I then launch my app via adl in another terminal window ("adl simple-html-app.xml"), and it starts up. It launches a window with my AIR app, but the content is not loaded. I see this in the fdb terminal window:
*Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session. [SWF] HelloWorld.html - 0 bytes after decompression*
0 bytes after decompression? That immediately makes me think something is wrong. And it's not a SWF, it's an HTML file.
Additionally, no matter what command I type, I get the same response. "Do you want to attempt to halt execution? (y or n)." And no matter how I response, the app remains "hung", seemingly without having executed any code?
Here's a sample session. My commands in bold, fdb responses in italics.
info sources
Do you want to attempt to halt execution? (y or n) y
Attempting to halt.
To help out, try nudging the Player (e.g. press a button)
{hit enter}
Do you want to attempt to halt execution? (y or n)
Not confirmed.
continue
Do you want to attempt to halt execution? (y or n) {hit enter}
Not confirmed.
{hit enter}
Do you want to attempt to halt execution? (y or n) {hit enter}
Not confirmed.
continue
Do you want to attempt to halt execution? (y or n) {hit enter}
Not confirmed.
continue
Do you want to attempt to halt execution? (y or n) n
Not confirmed.
continue
Do you want to attempt to halt execution? (y or n) y
Attempting to halt.
To help out, try nudging the Player (e.g. press a button)
Am I missing a step? How do I get command line debugging working?
-Josh