Unable to debug modular Flex application

My environment is quite simple. I have a main browser-based Flex application which loads a Flex module.  The application and the module are both configured in IDEA as separate IDEA modules. mxmlc is configured as my compiler preference and debugging information is enabled within IDEA.

I can successfully debug the main application. Additionally, the module compiles and loads successfully within the main application. When selecting a break point in the module it is a solid red circle. When I load the module from the application, the red circle changes and contains an 'x'. I would expect a checkmark instead.

I'm running IDEA 10.5.1 and compiling with Flex 4.5 in Flex 3 compatability mode.  I'm debugging using the Flash 10.3 debugger plugin for Firefox.

Any advice on how to debug the module?

Comment actions Permalink

Hi Steve,
(x) breakpoint means that debugger (Adobe's fdb tool from Flex SDK) said that there's no executable code at this line. So this looks like a bug in Adobe's tool: https://bugs.adobe.com/jira/browse/SDK-29513. If you can attach sample project to reproduce the issue we'll try to workarond this bug on IDEA's side.

Comment actions Permalink


I did some more investigation and it appears the issue isn't entirely related to SWF modules at all.

I created a new project with the same basic layout and identical compiler options as the project in question. I was unable to reproduce the issue. I was able to successfully debug a modular Flex application. I tried all kinds of things to make it fail and couldn't.

So, I went back to the IDEA project I'm having trouble with. Same issue, except I discovered that my inability to debug the module actually extended back to a Flex 3 MXML component that I'm also not able to debug. The component is in my main application.

So, In my main application, I can debug nearly all AS3 and MXML classes, but there is one particular MXML component which I cannot debug. This component is a complex view which also is responsible for including the component which pops up the module. So, I'm assuming that since I cannot debug this one MXML component in my main application, the debugger gets lost and doesn't know about the module I'm loading, which was the original problem I posted.

The MXML component in my main application which I cannot debug is in the same package as other components which I can debug. I haven't been able to figure it out. Setting breakpoints in the component yields the (x) in the red dot.

I've tried Flex 3.5 and Flex 4.5 (in Flex 3 compatability mode) with the same result. I'm using Flash 10.3 debugger in Firefox on a Mac. I've tried IDEA 10.03 and 10.5.1 with the same result.

Any idea why I cannot debug this component? I've never noticed this behavior until now.  Any known programming techniques or libraries that would cause this behavior?


Comment actions Permalink


I found the code responsible for preventing the entire component from being able to be debugged.

In the MXML component I have the following code:

<mx:DateFormatter id="dateFormatter" formatString="EEEE MMMM DD, YYYY"/>
<mx:DataGrid id="myid" width="100%" dataProvider="{ myProvider }">
  <mx:DataGridColumn headerText="Added On" dataField="addedon">
        <mx:Label text="{outerDocument.dateFormatter.format(data.addedon)}"/>

If I remove the inline itemRenderer, I can successfully debug the entire MXML component. With the item renderer in place, I cannot debug any code in the component. The code above works. It compiles and formats the 'addedon' field as expected. As to why this code is preventing me from debugging this component (or any other component called from this view, including loaded Modules), I have no idea.

Any clues? Workarounds? Other ways to code this that would make the debugger happy?

This is certainly one of the strangest problems I've encountered in a long time.

Comment actions Permalink

Indeed, inability to debug MXML with item renderer is a known bug in Adobe's fdb which is not workarounded at IDEA's side. The isue is http://youtrack.jetbrains.net/issue/IDEA-57546 (it is also mentioned in Adobe's issue that I posted above). I tried to patch fdb as suggested in Adobe's issue, but it didn't fix the issue. Well, at least probelm with item renderer is 100% reproducible and later or sooner we'll workaround it.


Please sign in to leave a comment.