Debugging Large, Modular Flex Apps

Good afternoon all,

I am feeling out IntelliJ Idea for Flex development as an alternative to Flex Builder and I am so far impressed with what I see, however there is one impediment which I would hope to get some feedback on.  At a general level, when I run the debugger on our Flex app(which is a large, modular app), it is extremely slow to load it.  After that initial load, the app seems fine, but that first load is so long that I was hoping that someone else ran into this issue and had some advice to give.

In Flex Builder the debugger works fine and is of normal speed, so I'm just wondering if I'm missing some configuration setting?



What IDEA version do you use?
Logs from debugger would help us to answer. 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.


I did as stated, and I have the log file that was generated.  Please note I anonymized some of the swf names/packages/sites/ips for confidentiality reasons.  I haven't noticed anything out of the ordinary however, that one exception for the vcs I believe was bc of a bad path on my side.

Thanks for the response!


You are right, nothing bad in logs.
But as far as I see debugging was not extremely slow this time, was it?


Unfortunately, it was still the same amount of time. There is about a 2 minute gap from when the app initializes to when data is actually retrieved and displayed.  2 minutes in itself is not a lot of time, but if you are going through a debug process of editing a swc/swf which takes a few minutes to compile, and then this additional 2 minutes to start the app in debug relaly starts to add up.  In FB, this delay is not present, so I was hoping it was just some switch that I forgot to set somewhere within the IDE?  I turned off the flag that builds the app before a debug session, but that didn't appear to have any affect.



Also, this is curious to me:

2010-03-09 13:05:20,820 [ 653652]  DEBUG - pt.flex.debug.FlexDebugProcess - 1268157920820 [SWF] //modules/DModule.swf - 5,126,851 bytes after decompression
2010-03-09 13:05:40,538 [ 673370]  DEBUG - pt.flex.debug.FlexDebugProcess - 1268157940538 Additional ActionScript code has been loaded from a SWF or a frame.
To see all currently loaded files, type 'info files'.
Set additional breakpoints as desired, and then type 'continue'.
2010-03-09 13:05:40,538 [ 673370]  DEBUG - pt.flex.debug.FlexDebugProcess - 1268157940538 Sent:continue
2010-03-09 13:06:03,304 [ 696136]  DEBUG - pt.flex.debug.FlexDebugProcess - 1268157963304 Additional ActionScript code has been loaded from a SWF or a frame.

This occurs throughout the debug process, and takes 20 seconds per execution.  Is the DebugProcess just bad at loading modules?


I'm afraid that delays are caused by Flash Player + fdb tool. And you'll get the same results if you try to debug your application manually using fdb console without IDEA at all.
May be increasing of fdb heap size could help. Please try to increase the value of -Xmx option of java.args property in <Flex SDK>/bin/jvm.config file.


Yea..I just finished trying that and's really slow in fdb.  Flex Builder is doing something to speed up the debugger, or its using a different implementation.  I went to the sdk that my FB was using, and changed the names to something else to see if that would cause some kind of launching error, and it didn't.  I'm still investigating, bc I want to know what FB is doing that fdb/idea is not..either they are passing some flags in or are using a different impl.

Any thoughts?


For us we experienced a similar issue. Our slow down is due to a lot of spam in the Flash log regarding SWFs loading and unloading.  

The only way we were able to solve the issue was to write a plug in that eliminated the spam in the log (note that filtering it in the IDE does not improve performance, the plugin we developed was the only way to resolve this issue)


IntelliJ IDEA 11.1.3 EAP contains some debugger performance fixes. Dealing with load/unload spam should be mush faster now. Can you please check it?

Just wondering, how does your plugin works?


Unfortunatly the plugh in was created by someone before I joined the team, I dont know much about it.  I might be able to dig up the source, but....

The EAP version you linked works like magic, MUCH improved speed in the logging, no need for the plug in with this version.

Thanks Alexander!


Please sign in to leave a comment.