vscode-as3mxml: Can't load ANEs on mobile project
Hi, brand new to the extension in vscode and migrating from IntelliJ. I think I might not be understanding how to get my ANEs to be found by my debug build. What I am trying to do is run the (Launch SWF) debug task to debug my mobile application in the IOS simulator. My anes are in a “anes” folder in my project’s root folder, which also contains my .code-workspace file. Here’s what I have so far:
launch.json
{
// Use IntelliSense to learn about possible 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",
"preLaunchTask": "build-debug",
"profile": "mobileDevice",
"screensize": "iPhone6Plus",
"screenDPI": 401,
"versionPlatform": "IOS",
"extdir": "${workspaceRoot}/anes"
},
{
"type": "swf",
"request": "attach",
"name": "Attach SWF"
}
]
}
tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"identifier": "build-debug",
"type": "actionscript",
"debug": true,
"problemMatcher": [
"$nextgenas_nomatch"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
asconfig.json (all paths relative to root folder)
{
"config": "airmobile",
"compilerOptions": {
"output": "out/app.swf",
"library-path": [
"libs",
"anes"
]
},
"application": "src/Sports App-app.xml",
"files":
[
"src/Main.as"
],
"airOptions": {
"android": {
"extdir": [
"./anes"
],
"output": "out/Main.apk",
"signingOptions": {
"storetype": "pkcs12",
"keystore": "android_certificate.p12"
}
},
"ios": {
"extdir": [
"./anes"
],
"output": "out/Main.ipa",
"signingOptions": {
"storetype": "pkcs12",
"keystore": "ios_certificate.p12",
"providerName": "path/to/file.mobileprovision"
}
}
}
}
With these configurations in place, I hit play on the Launch SWF debug config, and I get the following error:
Process terminated without establishing connection to debugger.
The content cannot be loaded because there was a problem loading an extension: Error: Requested extension com.milkmangames.extensions.GoViral could not be found.
I have confirmed the com.milkmangames.extensions.GoViral.ane file is inside the anes folder. Here is a screenshot of my folder structure:

Am I doing something wrong?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 29 (15 by maintainers)
EDIT (2019/11/08): You should never need to set
extdirin launch.json anymore. ANEs are now automatically unpackaged, and this field is populated automatically. This advice was for an older version of vscode-as3mxml.I don’t have experience with ANEs, but this is how they work, as I understand it.
The compile the SWF and for code intelligence, you should add your original, unextracted .ane files to the
library-pathfield in thecompilerOptionssection of asconfig.json. The way that I understand it, they are treated like .swc files.For packaging your AIR app, you should add the folder containing your original unextracted .ane files in the
extdirfield in theairOptionssection of asconfig.json.For debugging, you must extract the .ane files. As I understand it, a special naming convention is required. I think the new folder needs to have the same name as the original file (including the .ane file extension!). You add the parent folder of all of the unextracted ANEs to the
extdirfield of launch.json.If anyone sees that I got anything wrong, please let me know.