I first noticed the debugger wasn’t working when I tried to set a breakpoint and FlashDevelop didn’t break on it. I poked through the project settings and found that it was using C:\Users\Eric\AppData\Local\FlashDevelop\Apps\flashsa\14.0.0\flashplayer_14_sa_debug.exe
to debug.
(From here on out, all paths are relative to C:\Users\Eric\AppData\Local\FlashDevelop\Apps
unless otherwise marked.)
So I changed it to use FlashPlayerDebugger.exe
. from flexsdk\4.6.0\runtimes\player\11.1\win
. It still didn’t work. So I checked online for some more help, found out that FlashDevelop uses the fdb
program from flexsdk\4.6.0\bin
as a debugger. I tried launching fdb
directly from the command line, and it said it had an error loading jvm.dll
from my JAVA_HOME
.
I have Java 8 installed, and I read online that Flex wants a 32-bit Java 6, so I installed that and edited jvm.config
(found in the same directory as fdb
). I changed the line
java.home=
to say
java.home=C:\Program Files (x86)\Java\jdk1.6.0_45\
But then it said “Error: could not find a JVM.” I did some more digging, and found that others were using forward-slashes instead, so I then tried changing it to
java.home=C:/Program Files(x86)/Java/jdk1.6.0_45/
but this gave me the same ambiguous “Error loading” message from before. I think the forward-slashes messed it up, but it was worth a try.
I then downloaded the latest Flex SDK and installed it overtop of the existing one, despite the version numbers seeming to be identical. Suddenly, fdb
worked, without even changing java.home in jvm.config
! However, FlashDevelop couldn’t compile my code. So, I re-set that variable in jvm.config
to point to C:\Program Files (x86)\Java\jdk1.6.0_45
this time, and then FD could compile again.
As soon as I had compiled, though, fdb
went back to saying “Error: could not find a JVM.” FlashPunk still didn’t break at my points, either. I noticed that the play/pause/stop icons at the top of FlashDevelop would suggest that the debugger is still going, even after I closed the Flash player running my game. Here is a little screenshot to show their state: http://i.imgur.com/YXP7cpD.png
At this point I’m stumped. Here are the facts as well as I can tell:
-
fdb
works fine with Java 8. - FlashDevelop needs Java 6 to compile ActionScript 3.0.
- Both programs use the same
jvm.config
file to find a JVM. It seems that I can either compile in FD, or debug from the command-line, but I can’t do both at the same time, and I can’t attach a debugger to FD.
Is there a way to set separate Java versions for different parts of FlashDevelop?