Craig Innes
Craig Innes

Reputation: 1573

Debugging Haxe with HaxeCpp and IntelliJ. DebugSocket not Found

I am currently trying to get the Haxe Debugger working with IntelliJ, using information from This video tutorial and This blog post.

At one point, the tutorial says that a DebugSocket object must be created in the "create" method of the main file. However, when I type this in, I get an unknown symbol error.

From what I understand, the DebugSocket object should be available from the hxcpp library (which I have included). However, the only options I am given if I type new hxcpp. are:

What am I doing wrong? Have I included the wrong library? Are these tutorials referencing an older version of the library? Is there anywhere I can find comprehensive documentation on how to use the hxcpp debug tools properly?

Upvotes: 2

Views: 559

Answers (1)

Chii
Chii

Reputation: 14746

If this is easier with a flash build then I would consider this.

i haven't gotten hxcpp debugging to work (but i m sure it does). However, i find flash debugging to be easier. I assume you already have the project setup in idea (and isn't just using it as a simple text editor). This is the set of steps i took to get it to work:

  1. Open the project structure (from the menu 'file', then 'project structure')
  2. find the 'modules' section on the left, and select your module, then find the 'haxe' tab.
  3. in the haxe tab, select compile with 'openfl', and target flash.
  4. in the bottom part of the haxe tab, select a flex sdk.
  5. if you don't have flex+air sdk installed, you can easily install it by going to http://www.adobe.com/devnet/flex/flex-sdk-download.html, and http://www.adobe.com/devnet/air/air-sdk-download.html. make sure you remember where you installed it. An alternative place you can find it is via flashdevelop's 'tools', 'install software' menu (which by default installs to your C:/Users/username/AppData/Local/FlashDevelop/Apps/flexairsdk/4.6.0+4.0.0/.
  6. you can add the sdk to intellij by selecting 'SDKs' on the left, and click on the '+', and then select 'flex/air' sdk. You need the flex plugin installed (whcih should be by default).
  7. once you got your debug SDK setup, you can create a run configuration, and debug like you normally do (click on the debug run menu item or toolbar button).

One complication is that on windows, you potentially have a deadlock with haxelib not starting your app, and intellij hanging to wait for it. See https://github.com/TiVo/intellij-haxe/issues/123 - i have outlined a solution in the issue comment if you find that you also have this problem.

use this website : http://raintomorrow.cc/post/48029438701/setup-idea-intellij-for-haxe-nme-development for some screenshots (it's an older version of intellij tho).

Upvotes: 1

Related Questions