How to debug haxe project?

I am programming in haxe, and I've read that debugging is enabled with Flex SDK for Flash target. I have imported Flex SDK in IDEA, and when I try to debug I get:

Adobe fdb (Flash Player Debugger) [build 23201]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Waiting for Player to connect


Then I searched and saw that this may be due to IDEA waiting to connect to player which is being debugged. This indeed is true, because when I launch app in Flash player and click Debugger in context menu, I get additional line saying:

Player connected; session starting.

I want to automatically start Flash player when I request debug. Mostly because I can't debug start of the movie until I explicitly say Debugger. Is this still under development, or can I do something to achieve my goal?

Kind thanks,
Vjeko

0
6 comments

Hi Vjeko,

Does anything happen when you click run or debug? Your swf file should be opened automatically.

Best,
Fedor

0
Avatar
Vjekoslav Ratkajec

Hi, I am using ant script to build and test projects. Specifically I'm calling haxelib nme build MyProject and haxelib nme update MyProject. On configuration I have it set to run MyProject.swf (flash file generated by my project), and have ticked to build from ant. This doesn't run automatically my player. If I build from ant with haxelib nme test MyProject then my player launches, but still no connection is made to IDEA. On project settings I've selected nmml with Flash as a target. I've also set path to my nmml and provided Flex SDK for debugging.

Am I doing something wrong?

Regards,
Vjeko

0

Did you specify the ant task in run configuration(see screenshot)? I tried your workflow. And it works for me. You can check my sample project here.

Best,
Fedor



Attachment(s):
nme-ant.png
0
Avatar
Vjekoslav Ratkajec

Hello, sorry for not replying sooner didn't make any time. :-/

Anway, I have setup identical to yours, but Flash player will not start on its own. When I take the same build and instead of Debug issue Run command that player starts automatically. Maybe worthy note is that I'm working on linux, but I don't see any issue there.

Any idea? :-)

Cheers,
Vjeko

0
Avatar
Vjekoslav Ratkajec

Btw. when I tried to import your project and start it, I couldn't even get to start Flash player when issuing Run command.

0

Works fine here. Windows, Haxe 2.09, NME 3.3.3
I've created project "from existing source" in Fedor's project folder and it is compiling, starting Flash Player and debugging.
The only changes I made is config for my Flex SDK and NME lib, and setting run configuration like on Fedor's screenshot.

So, debugging works fine, if building project with Ant (or plain haxe compiler).

By the way, it is still not working if I use "Compile with: NMML" option in Project structure.

0

Please sign in to leave a comment.