Debugging AIR applications over USB on iOS

With the release of AIR 3.3, it is now possible for developers to debug their iOS AIR applications over a USB cable on the device. Prior to this release developers had to use wifi for debugging an AIR application on the iOS Device. There were, however, a few limitations associated with wifi debugging.

1) A developer needs to have internet connection available all the time.
2) Both the device and the desktop machine must be on the same subnet.

This new capability will solve the above mentioned problems and will provide a seamless debugging experience to the user by just connecting the iOS device to a Mac or a Windows machine. Since this feature is not available in Flash Builder or Flash Professional at the moment, a developer has to perform certain steps to get the debugging over USB working.

The steps required to set up the debugging over USB are as follows:

Package the application

While packaging the application one would need to specify “-listen <port_number>” option instead of “-connect <host_name>” which is used in case of wifi debugging.

Install the application using iTunes. Upon launching the application, one will see a dialog saying that ADOBE AIR is waiting for connection. The application waits for 60 seconds for the FDB(Flash Debugger) to connect at the port specified during the packaging. If no client connects, the application times out and launches as usual.

Get Device ID

A new binary named idb is shipped with the SDK, and it is present at the following location “”lib\aot\idb\idb”. Running this binary with the “-devices” option will give the list of the devices attached to the machine with Device ID and UUID.

In order to create a connection between the device and the machine, one needs to forward the local port of the desktop machine to the remote port (i.e the port on which the application is listening) on the device. This can be done using the idb binary. Since there can be a large number of devices attached to the machine, one needs to specify the device id while forwarding the port so that a connection with the specified device is established.

This is expected behavior and is not a problem as when ./idb forward LOCAL_PORT REMOTE_PORT DEVICE_HANDLE command is executed, a server is started which waits indefinitely for the clients to connect to it.

In order to stop this process, use idb -stopforward LOCAL_PORT.
Hope this helps.