2

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:

  • Builder
  • NekoInit
  • StaticMysql
  • StaticRegexp
  • StaticSqlite
  • StaticStd
  • StaticZlib

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?

Mark Knol
  • 9,663
  • 3
  • 29
  • 44
Craig Innes
  • 1,573
  • 11
  • 23
  • Have you tried adding `-lib hxcpp` to your project? – Waneck Jun 06 '15 at 19:08
  • @Waneck I have added hxcpp as an external library to my project. In fact, when typing hxcpp, intelliJ attempts to autocomplete it with the list of bullet pointed options mentioned in the question. However, none of these options seem to match with the instructions given in the tutorials. – Craig Innes Jun 06 '15 at 23:22
  • By external library, do you mean via a ? – Chii Jul 08 '15 at 11:06
  • Since you didn't specify in your question, is the point to get _any_ sort of debugging? or did you specifically wanted to use hxcpp debugging (for debugging a native build)? If you don't mind any sort of debugging, it's easier to get flash flash debugging working imho. – Chii Jul 08 '15 at 11:08
  • @Chii Ideally i would want hxcpp debugging, but really I just want any debugging ability where I can break on a line and inspect variables. If this is easier with a flash build then I would consider this. – Craig Innes Jul 08 '15 at 12:09

1 Answers1

1

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).

Chii
  • 14,540
  • 3
  • 37
  • 44