Debugging Flex module swf in IDEA

I have IntelliJ IDEA 9.0.2 build 95.66. I am trying to debug an AIR app that loads other Flex module swf using
I have the AIR application and the Flex modules loaded within IDEA as modules. When I debug the AIR application by launching it from within IDEA, I can see the break points within the code of AIR application to take effect.
However, I am unable to debug the modules that get loaded within the AIR application.
When I connect IDEA to externally running adl, I can see the trace statements within IDEA console but am still unable to debug the loaded swf modules.

Has anybody had success debugging module swfs?  If you have, can you share your debugger configuration and possibly walk me through the configuration porocess? Thanks.


How do breakpoints in modules that you are unable to debug look like? I mean is there a (x) symbol drawn over a red circle?
If breakpoints just remain red circle without anything drawn on top of it then you need to make sure that they are compiled with debug information. If you are sure that they are then please provide some more information about you project configuration. The best thing to investigate is a sample project where the issue is reproducible. If you can't provide one then following information could help us:
- Flex SDK version
- how do you compile main AIR application and modules
- code snippet that loads module
- logs from Flex debugger. To get logs please do following:

-- remove old logs from <idea.system.path>/log/*.* (idea.system.path property is set in the file <IDEA  installation>/bin/

-- edit file <IDEA  installation>/bin/log.xml and add following category there:

   <category  name="com.intellij.lang.javascript.flex.debug">
     <priority  value="DEBUG"/>

--  launch IDEA, reproduce the problem

After that please attach
<idea.system.path>/log/idea.log  file here.


Hi Alexander

Thanks for answering. Here are the details you requested
* Break points for the AIR app appear red without a cross in them.
* Break points for the loaded modules are red and then change to have a black cross in them.
Attached is a screenshot of my IDEA project showing the break point with cross in it.

Flex version:
I have this version sdk configured in IDEA and use it to build both the AIR app and the module swfs.
I launched debugger from within IDEA for the AIR app project module.

Here is the code snippet for loading module swf:

           var loader : URLLoader = new URLLoader();
            loader.dataFormat = URLLoaderDataFormat.BINARY;
            loader.addEventListener(Event.COMPLETE, handleDataLoadComplete, false, 0, true);
            loader.addEventListener(IOErrorEvent.IO_ERROR, handleIOError, false, 0, true);
            loader.load(new URLRequest("http://localhost:8080/appContext/moduleSwf.swf"));

I changed the debug log settings in IDEA and deleted my old idea.log file. After restarting IDEA, I dont see the log file anymore.

I won't be able to package a sample application for you, but I can provide all other information you may need.

Thanks for your help.

Picture 9.png


I was wondering if you got the chance to look at Nirupama's question. I work in the same company as her and both of us (and other IDEA users) can do everything but debug our AIR app in the IDE of our choice.


Hi Nirupama and Manish!
I'm sorry for delay, but I'm really interested in finding the cause of the problem.

Absence of logs is rather strange. Please make sure that there are no syntax errors in log.xml file and that you are looking for logs in a correct place.

But I'm not sure that logs would give me a clue. The best thing would be reproducing the problem. I created a sample project myself but I have breakpoints working in loaded module. Could you please take a look at attached project if it works for you and modify it in order to reproduce non-breakpointable code?
My workflow:
- open project
- launch 'appContext' run configuration
- launch 'air-app.xml' run confuguration (Debug mode)
- click 'Load module' button in started AIR application
- breakpoint in FlexModule.mxml file is reached (by some reason I sometimes need to click 'Load Module' button  twice).


Hi Alexander

I was able to debug the sample application/module you have attached. I then modified it to use the exact loading mechanism that we have in our code and I was able to debug that as well.
The problem in our application could be because of the layers that we have. Here are the details:

- declares a namespace with a specified hand-written manifest.xml

adchemy-lib2.swc depends on adchemy-lib1.swc
- declares same namespace as adchemy-lib1.swc http://ax/ but has its own manifest.xml

When I import both of these modules in IDEA, it automatically creates the module dependency - adchemy-lib2.swc depends on adchemy-lib1.swc.
With no further changes, I can compile IDEA module adchemy-lib1.swc without any issue. However, I cannot compile adchemy-lib2.swc as there is a compilation error that says it cannot find classes defined in namespace for classes defined in adchemy-lib1.swc's manifest.

These 2 modules compile fine with flex-mojos on command line. All other application modules rely on these 2 libraries in our product.

Do you have any idea why I will not be able to compile the second library? I can provide any other info you need.




Please make sure that custom flex compiler configuration files (target/...-config-report.xml) are used for compilation. Details are here If it is true then please attach -config-report.xml files for both swc modules.


Hi Alexander

I am attaching the config report files for the 2 modules in our codebase. adchemy-flex-shell module depends on adchemy-flex-common module.

To experiment further, I combined the 2 modules into one with a single manifest and then imported this single module into IDEA. With this configuration, I was able to debug the loaded flex modules. Yay!
Before I go down this path and change our code base, I'd like to know if there is some configuration I am missing to add support for multiple manifest files under same namespace. Please let me know asap.

Thanks for all your help on this!



To resolve compilation issues without changing module structure please try to change line 43 in adchemy-flex-shell-1.8-SNAPSHOT-config-report.xml from

As for debugging issues - they are caused by Adobe's debugger bug:
But I still would like to get a sample project to reproduce - may be we could find a workaround in IDEA.


Please sign in to leave a comment.