4

Using Flash builder 4 to build an AIR app.

I keep having my code changes not take effect when I launch the project with the debugger, probably happens about once an hour. So does anyone know how to have FlashBuilder clean the project automatically before each launch?

Thanks

invertedSpear
  • 10,864
  • 5
  • 39
  • 77

3 Answers3

6

I'm having a similar issue with a Flex application. If I make a change to an .as file the change is not taking effect. The component is being instantiated by a parent component in the application so the compiler should be catching any changes I made. In fact, I can put a syntax error in the file and it won't report a problem. I've uninstalled and reinstall Flash Builder 4. I have to do a clean every time. I tried the tip from rakslice's comment of compiling with mxmlc manually and it successfully compiled without any clues as to what the issue with incremental compiling in Flash Builder 4 is. I finally added "-incremental=false" to my project's additional compiler arguments. This takes longer to compile of course, but I find it easier than having to click Project --> Clean every time.

Jamie McDaniel
  • 1,809
  • 19
  • 15
  • thanks for keeping the old thread alive... I will try that compiler argument when I get back into flex development – invertedSpear Nov 04 '10 at 15:25
  • I had been getting "Java Heap Space" errors so frequently! This fixed it! Now I don't have to Clean before I build! – Carl Walsh Apr 01 '13 at 13:19
1

I find that as long as I don't change code and/or recompile while an active debug sessions is on-going; I have no issues with the application not picking up code changes between subsequent runs.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • hmmm, I do tend to be lazy, and so I have FB terminate the current run to start a new one, so this is very possible. So in the interests of maintaining the Automatic nature of my question can I change it so that it ends a current debug session before launching a new one? Maybe a chain of commands after a keyboard shortcut a la MS office macros? – invertedSpear Jun 04 '10 at 19:18
  • Sorry; I'm not sure if you understood my post. I didn't think it was possible to have 2 active debug sessions running at once. The key for me has been not to change code while a debug sessions is active. Be sure to terminate the active debug session before recompiling your app. If you have build automatically enabled, the app is recompiled every time you save changes to a file. – JeffryHouser Jun 04 '10 at 19:27
  • you can't have 2 at once, but FB will terminate your current one when you start a new one. I understand what your saying, don't modify code while debugging, but this is exactly what I want to do. I know it's simple to go click that red square, but I don't even want to do that, it would be simpler just to click the debug button and have FB automatically close any current debug session, clean my code, then build and launch. – invertedSpear Jun 04 '10 at 20:27
  • It sounds like you want a "Build on Debug" or "Build on Launch" type of feature in addition to "Build Automatically" an/or "Build Manually". If so, feel free to fire a feature request. http://bugs.adobe.com/flex/ – JeffryHouser Jun 04 '10 at 22:14
1

I'm finding that I have a very similar problem. Everytime I launch my Flex app in a browser I have to perform a Clean just to get it to run.

I have noticed that I get a JavaScript error saying 'swfobject' is undefined odd error to be getting.

Not sure if that helps?

StephenAdams
  • 521
  • 2
  • 9
  • 26