5 Replies Last post: Nov 11, 2013 7:06 PM by Niels Bosma  
Niels  Bosma Newbie 3 posts since
Nov 11, 2013
Currently Being Moderated

Nov 11, 2013 2:55 PM

Debugging Flex app doesn't hit breakpoints ?

Hi,

 

I'm having problems with debugging my Flex app. I get trace output but it doesn't hit breakpoints:

CropperCapture[1].png

 

Console output:

"c:\program files (x86)\jetbrains\intellij idea 12.1.6\jre\jre\bin\java.exe" -Dapplication.home=C:\bin\flex3 -Xmx384m -Dsun.io.useCanonCaches=false -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.6\plugins\flex\lib\idea-fdb-3-fix.jar;C:/bin/flex3/lib/fdb.jar" flex.tools.debugger.cli.DebugCLI

Adobe fdb (Flash Player Debugger) [build 9271]

Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.

Waiting for Player to connect

Player connected; session starting.

[SWF] /swf/monkeywrench.swf - 4,851,375 bytes after decompression

[trace] here

 

I'm debugging in IE 10 and I have the debugger version of Flash:

CropperCapture[3].png

 

I'm compiling my Flex app using an ANT-skript:

 

<project name="monkeywrench-client" default="compile" basedir=".">

 

   <property file="local.build.properties"/>

   <property name="mxmlc.jar" location="${flex.sdk.dir}/lib/mxmlc.jar"/>

 

   <target name="init">

      <!--copydir src="assets" dest="${compile.assets.path}"/-->

   </target>

 

   <target name="compile" depends="init">

      <java

              jar="${mxmlc.jar}"

              fork="true"

              maxmemory="512m"

              failonerror="true">

         <arg value="+flexlib=${flex.sdk.dir}/frameworks"/>

         <arg line="-load-config+=flex-config.xml" />

         <arg line="-source-path ."/>

         <arg line="-services+=services-config.xml"/>

         <arg line="-library-path+=./lib/"/>

         <arg line="-output='${compile.swf.path}/${compile.swf.name}'"/>

      </java>

   </target>

 

</project>

 

With local.build.properties:

 

<flex-config xmlns="http://www.adobe.com/2006/flex-config">

    <compiler>

 

        <debug>true</debug>

 

        <keep-as3-metadata>

            <name>Form</name>

            <name>FormField</name>

        </keep-as3-metadata>

 

    </compiler>

    <file-specs>

        <path-element>Monkeywrench.mxml</path-element>

    </file-specs>

</flex-config>

 

What am I missing?

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
Nov 11, 2013 3:22 PM in response to: Niels Bosma
Re: Debugging Flex app doesn't hit breakpoints ?

Why don't you compile by the IDE?

Probably your project is not configured correctly because there's red code on the screenshot. If you need assistance in project setup please attach your .idea folder contents, *.iml file(s) zipped and briefly describe your project structure.

 

As far as I understand you need to use ancient Flex SDK 3.x for your project. Debugging should work better with debugger tool from more recent SDK. Luckily in IntelliJ IDEA you can use one SDK for code highlighting/compilation and another one for debugging. Please try following:

- download Adobe Flex SDK 4.6 or Apache Flex SDK 4.11 and install it on your computer

- configure this SDK in Project Structure | SDKs

- click Run | Edit Configurations... and select this 4.x SDK in the 'Use Debugger from SDK' field.

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
Nov 11, 2013 6:56 PM in response to: Niels Bosma
Re: Debugging Flex app doesn't hit breakpoints ?

Thank you for the attachment.

Now I see that you didn't configure any source roots. Open File | Project Structure | Modules | [your module] and fix it.

You only have one content root configured (F:/Checkouts/Offerta/branches/blackwidow/Source/Monkeywrench.Flex/flex), and no source folders at all.

I guess that module root folder (where dev_blackwidow.iml file located) should be a content root, and its src subfolder should be a source folder.

I don't know what is there in F:/Checkouts/Offerta/branches/blackwidow/Source/Monkeywrench.Flex/flex, may be it shoud be a content root with src source folder, may be - not.

 

Then to get code referring 3rd party libraries green see how to configure dependencies: http://confluence.jetbrains.com/display/IntelliJIDEA/Dependencies+Management+%28Build+Path%29

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
Nov 11, 2013 7:04 PM in response to: Alexander Doroshko
Re: Debugging Flex app doesn't hit breakpoints ?

Looking a bit more at your project files I see that you keep source files directly in the project root dir, without src subfolder. That's not very good decision, but if you do not want to change it now you can configure project root folder both as a content root and as a source folder. The same about F:/Checkouts/Offerta/branches/blackwidow/Source/Monkeywrench.Flex/flex: it seems to be both content root and a source folder.

 

When you configure source folder breakpoints will work, both with debugger from Flex SDK 3 and 4.

More Like This

  • Retrieving data ...