Debugging SSF2 In VScode¶
When modding SSF2 it can be painful to debug in Adobe Animate so here is a tutorial on how to set up your debugger in vscode .
Setting up the vscode Extension¶
To get vscode working you first need to get the AS3, MXML, and SWF Extension Pack and add it to your vscode. This Extension will allow you to launch swf’s in vscode without having to rebuild it.
Important
vscode DOES NOT build the code it only launches the swf. Any changes made to the code will require you to rebuild the swf in Adobe Animate.
Getting The ANE Folder¶
To be able to launch the swf you first need to let vscode know where the ANE files are located.
If you have Adobe Animate running completly close it, then reopen it with the SSF2.fla file you want to launch in vscode.
Go to your AppData\Local\Temp. If you dont know how to get to AppData press Windows key + R then type in %appdata%.
Note
Any chagnes made to the ANE’s will require you to redo this step.
In the \Temp folder you should see Tmp_ANE_File_Unzipped_Packages. Copy this and put it somewhere project directory that you can reference later.
Creating The Launch file¶
Open the SSF2 Project in vscode.
Go to the debug tab or press CTRL + SHIFT + D. There should be a text that says “create a launch.json file” click on the text. When the drop down comes down Click on the SWF Button
After you click on the swf a new file called launch.json should have popped up and it should look something like this.
{
"version": "0.2.0",
"configurations": [
{
"type": "swf",
"request": "launch",
"name": "Launch SWF"
}
]
}
Replace the above with the new code here and fill in the required text fields.
{
"version": "0.2.0",
"configurations": [
{
"type": "swf",
"request": "launch",
"name": "Launch SWF",
"program": "src\\ [SSF2-IDK-FOLDER-VERSION]\\SSF2-app.xml",
"runtimeExecutable": "[PATH-TO-AIR-SDK]\\bin\\adl",
"extdir": "[PATH-TO-TEMP-ANE-FOLDER]\\Tmp_ANE_File_Unzipped_Packages"
}
]
}
Once you have finished this you should be able to run and debug your swf by pressing F5.(Debugging might be discussed in a future guide)
Enjoy! Vscode offers a whole lot more features for coding than Adobe Animate, be sure to mess around with stuff and hopefully you can write your own guide someday.