apache-flexactionscript-3flexbuilderswccompc

Compiling a Flex Library with a source attachment using compc or FlashBuilder


I am trying to compile a Library SWC using FlashBuilder while retaining the references to the source code so that asdocs will still appear and the debugger will show source code when there is a problem. The results I want are similar to what you get when you set a "source-attachment" in the "ActionScript Build Path" settings panel. (see pic)

Is this possible? Is there a flag that I can set in FlashBuilder or compc to do this?


Solution

  • Unfortunately you can't build source into SWC files. However, you compile your SWC with a -debug flag it will retain markers to source file transitions. If you have a debug version of your SWC and the source in a folder then you can edit the "Source Attachment" for your library and point it at the source folder. Then you'll be able to step through the source in the debugger.