vshaxe / flash-debugger

Visual Studio Code Debugger for Haxe/Flash applications
MIT License
25 stars 7 forks source link

AIR application debug #18

Open ncannasse opened 6 years ago

ncannasse commented 6 years ago

Is there any way to debug a Haxe/AIR application ? would be a nice to be able to specify a AIR .app XML file instead of the SWF to launch with AIR.

Gama11 commented 6 years ago

I'm not very familiar with AIR, does that "just work" with fdb, or does anything additional need to be done to support it? Have you tried simply specifying an .app instead of an .swf? :)

ncannasse commented 6 years ago

AIR applications needs to be launch with adt command instead of the flash player debugger, and it takes a .xml/.app descriptor as parameter that tells about the window size and swf / native extensions to use, that's about it :)

hansagames commented 6 years ago

Really to debug air app (apk or ipa) you need to compile it with -connect param (optional IP) then it will wait for fdb to connect and will deliver same data as swf, there is vscode extension for as3 project, as an example. Question is about workflow, as there are 2 ways to achieve debugging, first is to compile app on launch and connect it, and second is to delegate app compilation, wait till its ready and then connect to the debugger. The second approach would delegate compilation to the environment (like openfl or other), as to compile air you need quite a data (icons, splash screens, xml descriptors e.c)

I would go with the simplest way and on debug session just launch fdb and wait till app connects, allowing build, install, launch to be done by specific framework e.c. Similar as remote debugger works in HaxeDeveloper, where you launch it manually and as soon it has connected editor switches in debug mode.

TomFors commented 5 years ago

The version of fdb.jar (and related files) that is included in flash-debugger doesn't support AIR applications and won't properly attach. The version of fdb.jar in the AIR SDK and the version included in FlashDevelop both do support AIR applications. Can we get fdb.jar updated to one of these other versions please?

Gama11 commented 5 years ago

Pull requests welcome. :)