-
-
Notifications
You must be signed in to change notification settings - Fork 41
Debug an Adobe AIR application running on a mobile device with Visual Studio Code
-
Create a new ActionScript project targeting Adobe AIR for mobile.
-
In Visual Studio Code, open the View menu and select Debug. Alternatively, click the debug icon on the sidebar, or use the Ctrl+Shift+D keyboard shortcut (or Command+Shift+D on macOS).
-
Click the gear ⚙︎ icon to configure the launch configurations for your workspace.
-
When prompted to Select Environment, choose SWF.
If .vscode/launch.json already exists in your workspace, you will not be asked to specify the environment. Instead, the existing file will open. You may click the Add Configuration button to add a new SWF debugging configuration to the existing file. Several default snippets are available, depending on which Adobe Flash runtime you are targeting.
-
A new editor will open with a launch.json file that looks something like this:
{ // Use IntelliSense to learn about possible SWF debug attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "swf", "request": "launch", "name": "Launch SWF" }, { "type": "swf", "request": "attach", "name": "Attach SWF" } ] }
We'll be using the Attach SWF debug configuration in a moment.
-
Package the Adobe AIR application. It should be a debug build for either iOS or Android.
-
Install the Adobe AIR application on your iOS or Android device. You may use the Adobe AIR ADT installApp command from the command line. Alternatively, iOS apps may be installed from Xcode on a computer running macOS.
-
Ensure that the Attach SWF configuration is selected is the Debug sidebar, and press the button with the play
▶️ icon to start debugging. Alternatively, use the F5 keyboard shortcut to start debugging. -
Launch your application on the iOS or Android device. If you prefer, you may use the Adobe AIR ADT launchApp command from the command line.
- Adobe AIR (Mobile)
- Adobe AIR (Desktop)
- Adobe Flash Player
- Apache Royale
- HTML and JS (no framework)
- Node.js
- Feathers SDK
- Adobe Animate
- Classic Flex SDK
- Library (SWC)
- Royale Library (SWC)