debugging haxe .swc

Hi,

Is there any way to debug the code compiled with haxe into a .swc? Debugging a haxe compiled standalone .swf works great but if I would like to debug a regular .swf containing code from a haxe compiled .swc the debugger just won't step into. No matter if I create a new module or specify the haxe sources for the .swc library. I've checked the .swc and the debug info is in the bytecode pointing to the .hx files.

If there is no way to do this now how hard it would be to support it? I hope with all the work done for the current haxe plugin it shouldn't be too hard.

Thanks

0
9 comments

Hi Peter,

Are you debbuging flash application that uses Haxe swx? If so, you can try to add Haxe sources to module dependencies.

Best,
Fedor

0

Yes, I have a flash app in a flash module and it uses a Haxe .swc
Should I add the Haxe sources as 'Library sources' or as 'Raw ActionScript library'?

0

I tried it as a 'Raw ActionScript library' and it worked now. I don't know what did I miss last time but this is really awesome! Thanks

0

It's better to choose 'Library sources'.

0

Raw AS Library means that you don't have binaries for these classes, so these raw sources must be compiled by IntelliJ IDEA when you are compiling your project. Raw AS library may be treated as an additional source folder with the only difference that it contains not your own sources that you edit, but some 3rd party sources that you do not edit. So you must configure these files as 'Library sources' - that means that you have binaries (swc file) and these source files are treated as an additional information just for convenience - to jump to declaration, view embedded documentation (if any), step in when debugging, etc.
In short: you configure one library with swc file(s) configured as Classes and library sources configured as Sources

0

Thanks for the clarification. Altough I did configure the library with an swc as Classes and the Haxe sources as Library sources still jump to declaration is not working. It jumps into the autogenerated library.swc of the swc. Is it possible that this could also work?

0

Truly speaking we haven't tested such use case. The fact that it works with hx files as Raw AS Library is a sort of unexpected side effect. Can you please open a request to support normal use case with *.swc as Classes and *.hx as Sources of the library? Sample project would be appreciated.

0

Please sign in to leave a comment.