Problem with the Flex Run/Debug

First off, tremendous thanks for starting on this functionality--been eagerly waiting for 8.0 so that I could try and shift all of my Flex coding away from FB. With that said, haven't had any luck in getting the run/debug to work yet. I had the 7.0.3 ant script version of things running, but with the changes to module types/fuller support in 8, can't get to the point of building and running. What's the intended workflow at this point? For a simple project, seems to be something along the lines of...

1) Create Flex module, specify SDK location -- tangential question, are facets for Flex still needed, or obsolete?
2) Create initial mxml file extending mx:Application, throw some hello world controls into it
3) ? - missing step here at this point--should compilation into the .swf occur through ant script at this point, and if so, what needs to change? Ant fails to run at this point because of no JDK, but specifying Flex as the SDK on the project seems to prevent selection of a JDK.
4) Since there's no compilation into .swf at this point, run/debug refuses to go anywhere, complaining that a valid .SWF needs to be specified.

12 comments
Comment actions Permalink

I have a problem with the Run/Debug settings, too:
I opened a 7.0.3 Flex project ok, but setting up a Run/Debug configuration I get Error: "No valid Flex SDK is specified for the project". I checked the Project Settings->Modules and in the Flex facet "/Applications/MyApps/Adobe Flex Builder 3/sdks/3.0.0" is configured. Then I went to Project Settings->General and tried to add a new "Flex SDK" - I get a "Probably JDK installed in '/Applications/MyApps/Adobe Flex Builder 3/sdks/3.0.0' is corrupt. This is definitely not the case because I use it in Flex Builder. This is on OS-X 10.5.2.

Anything I overlooked or a workaround? I really want to say good-bye to Flex Builder 3 :)

Thanks,
Peter

Edited by: Peter Jacobsen on Mar 21, 2008 11:59 PM

0
Comment actions Permalink

Once I get Run/Debug to work - is there a possibility to:
- configure the HTML template which is used to open the browser (I need to pass flashVars to the SWF)?
- configure the MXML and ActionScript compiler command line parameters (to use RSLs, different locales etc)?

Thanks,
Peter

0
Comment actions Permalink

You can specify JDK for running ANT

James Boe wrote:

First off, tremendous thanks for starting on this functionality--been eagerly waiting for 8.0 so that I could try and shift all of my Flex coding away from FB. With that said, haven't had any luck in getting the run/debug to work yet. I had the 7.0.3 ant script version of things running, but with the changes to module types/fuller support in 8, can't get to the point of building and running. What's the intended workflow at this point? For a simple project, seems to be something along the lines of...

1) Create Flex module, specify SDK location -- tangential question, are facets for Flex still needed, or obsolete?
2) Create initial mxml file extending mx:Application, throw some hello world controls into it
3) ? - missing step here at this point--should compilation into the .swf occur through ant script at this point, and if so, what needs to change? Ant fails to run at this point because of no JDK, but specifying Flex as the SDK on the project seems to prevent selection of a JDK.
4) Since there's no compilation into .swf at this point, run/debug refuses to go anywhere, complaining that a valid .SWF needs to be specified.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Same problem as James Boe is describing - this time under Windows. I configured the SDK with the project wizard, but no SWF output in out/test/ or out/production/]]> upon "Rebuild project" or "Make project". Run/Debug settings complain about "No valid SWF is specified".

What's the intended workflow?

Thanks,
Peter

0
Comment actions Permalink

Right now is expected to have swf compiled (via ANT with Java SDK
specified) once before debug.

Peter Jacobsen wrote:

Same problem as James Boe is describing - this time under Windows. I configured the SDK with the project wizard, but no SWF output in out/test/<projectname> or out/production/<projectnamee> upon "Rebuild project" or "Make project". Run/Debug settings complain about "No valid SWF is specified".

What's the intended workflow?

Thanks,
Peter



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Made some headway on it--to make it work, I did the following steps:

1) My existing project in 7.0.3 had multiple modules, one for Java source and one for the Flex code. I tried recreating the second module as the new Flex module, but ambiguities across the multiple modules/SDKs seemed to throw things out of whack here--kept running into problems with it complaining about no Flex SDK configured. So to get things working, I created a new project containing only the Flex code, with a single Flex module.

2) I added in an Ant file as was done with 7.0.3 to build the SWF, following the directions of the tutorial on the IDEA blog. I made sure that the deployment directory of the SWF was within the project path (threw it into a /bin directory).

3) I changed the Project JDK to the actual JDK, as opposed to the Flex SDK--this allowed Ant to build the SWF.

4) At this point, I was able to create a Debug configuration against that compiled SWF and successfully run it with breakpoints!

Initial feedback is that the SDK/JDK configuration as it stands now is somewhat confusing--usability there needs some love. It definitely seemed like there were some bugs in projects with multiple modules that I couldn't get around thus far. The Flex facet presumably needs to be removed, since it doesn't look like it's relevant anymore. It'd be great to have make within the tool itself as well, instead of needing the ant file.

0
Comment actions Permalink

SDK/JDK configuration will definitly be better and multiple modules
support is on the way (Flex SDK will need to be assigned for the module).

James Boe wrote:

Made some headway on it--to make it work, I did the following steps:

1) My existing project in 7.0.3 had multiple modules, one for Java source and one for the Flex code. I tried recreating the second module as the new Flex module, but ambiguities across the multiple modules/SDKs seemed to throw things out of whack here--kept running into problems with it complaining about no Flex SDK configured. So to get things working, I created a new project containing only the Flex code, with a single Flex module.

2) I added in an Ant file as was done with 7.0.3 to build the SWF, following the directions of the tutorial on the IDEA blog. I made sure that the deployment directory of the SWF was within the project path (threw it into a /bin directory).

3) I changed the Project JDK to the actual JDK, as opposed to the Flex SDK--this allowed Ant to build the SWF.

4) At this point, I was able to create a Debug configuration against that compiled SWF and successfully run it with breakpoints!

Initial feedback is that the SDK/JDK configuration as it stands now is somewhat confusing--usability there needs some love. It definitely seemed like there were some bugs in projects with multiple modules that I couldn't get around thus far. The Flex facet presumably needs to be removed, since it doesn't look like it's relevant anymore. It'd be great to have make within the tool itself as well, instead of needing the ant file.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

I still don't get it. I am able to build the SWF with an ANT build file into some directory <project-path>/deploy. In the Run/Debug dialog there is a combobox to select the debuggable SWF (I see all the leftower SWF stuff from Flex Builder in /bin-debug, bin-release and the one I created with IDEA in /deploy). I select the SWF but the "Error: no valid Flex SDK is specified for the project" (which is not true, because I can see it in the Flex facet) does not go away. When I try to select the Flex SDK in Project Settings->General->Project JDK->New, I get the "Probably JDK installed in </Application/blah/blah> is corrupt.
Same behaviour on OS-X 10.5.2 and Windows.

James - how/where did you select the Flex SDK?

Thanks,
Peter

0
Comment actions Permalink

Flex facet is not needed, you need to set Flex SDK for project (in
Project JDK combo box)

Peter Jacobsen wrote:

I still don't get it. I am able to build the SWF with an ANT build file into some directory <project-path>/deploy. In the Run/Debug dialog there is a combobox to select the debuggable SWF (I see all the leftower SWF stuff from Flex Builder in /bin-debug, bin-release and the one I created with IDEA in /deploy). I select the SWF but the "Error: no valid Flex SDK is specified for the project" (which is not true, because I can see it in the Flex facet) does not go away. When I try to select the Flex SDK in Project Settings->General->Project JDK->New, I get the "Probably JDK installed in </Application/blah/blah> is corrupt.
Same behaviour on OS-X 10.5.2 and Windows.

James - how/where did you select the Flex SDK?

Thanks,
Peter



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Think I encountered that same JDK error you describe when I was trying to tweak the JDK/SDK combinations with multiple module. Once I created a new project with a single Flex module, I was able to get around that error and choose a Flex SDK.

0
Comment actions Permalink

Thanks for the hint. I re-created a Flex project from scratch (single module) - now the SDK from the project wizard is accepted/remembered. I really do not know what I did differently from the first time :(

Now my problem is: for debugging IDEA starts the SWF without HTML wrapper; this leads to opening the Adobe CS3 Flash IDE, probably because this is the default application that the file extension .swf is associated with (on my OS-X 10.5.2 box). The real problem is, though: if an SWF is started without HTML wrapper, the Flash application lives in a sandbox and cannot load any assets (GIFs, fonts etc) - not even when started from the local machine.

I'll write up some suggestions/expectations for Flex development workflow in another thread.

Peter

0
Comment actions Permalink

Peter Jacobsen wrote:

I'll write up some suggestions/expectations for Flex development workflow in another Having JIRA request would be the best after discussion finished :)


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.