Debugger don't work with VS Code on Window

Hi !
I try to test Haxe/Heaps today. I test the the Hashlink Hello World tutorial and I encounter severals issues.

  • The first the the tutorial propose to run the debugger by press F5, it’s not proposed to run “Haxe: Select Configuration”. I need to find this by myself. Seems the default name for the config is build.hxml but the tutorial ask to create a compile.hxml

  • After the first issue resolved, when I have another issue : I have an error on the terminal : Fatal error: exception Failure("Couldn't connect on 127.0.0.1:6000"). I can resolve that by runinng the following command : haxe -v --wait 6000 but that should not be runned by the Haxe extension ?

  • After that I have a hello.hl (yeah) but that all. The debugger session run 1 second and stop and the game’s window don’t appeared. But if I run the hello.hl with the terminal command ‘hl bin/hello.hl’ the game start. That issue is the more problematic.

I investigate a little bit by running console.log in the Hashling extension folder (.vscode\extensions\haxefoundation.haxe-hl-1.4.2)
It seem the debugger don’t run the Hasklink extension code of the adapter.js (extensions.js is fine)
And I don’t know why.

Anyone can help me for these issues ?
Thank you very much.

My launch.json file

{
	"version": "0.2.0",
	"configurations": [        
        {
            "name": "HashLink",
            "request": "launch",
            "type":"hl",
            "cwd": "${workspaceFolder}",
            "program": "${workspaceFolder}\\bin\\hello.hl",
            "preLaunchTask": {
                "type": "haxe",
                "args": "active configuration",
            }
        } 
	]
}

My build.hxml file :

-cp src
-lib heaps
-lib hldx
-D windowSize=1280x720
-hl bin/hello.hl
-main Main
1 Like

:arrow_right: you can also ask on discord, because ppl seem to be reluctant to actually respond in the forums
:slightly_frowning_face:


I don’t know how to solve the issues here, I think I had the same set of problems in the beginning and so I now always debug with the prompt (cmd.exe or powershell and trace()s in the code)

these issues you describe really should get fixed (to provide a smoothly running tutorial is a must-have) but frankly the site runners /maintainers don’t seem to invest any time in that :frowning_face:

not even updating the site

(but OTOH you get everything for free, right… glad Heaps even exists, etc. … I really try to be positive here, but it seems everybody gives a fuck :wink: )

(…I’ll try to have a look into it and the edit this response later)


edit:
so I still encounter the same issues (though working with the setting as proposed in Installation and Hello Hashlink…

Btw what do you mean with:

(I’m just confused because HashLink and .js-stuff usually don’t bother each other :thinking: 'cause they’re different targets)

Thank you very much I will ask on Discord :slight_smile:

adapter.js is a part of the Hashlink vs code extension : the part that run the debugger !
I read and make some consol.log in the extension code to see what happen. But my knowlegde is limited in VS extension !

For posterity, I had an answer on Discord. The guilty is VS Code 1.82 I have rollback to 1.8 and that fix the lasts two points.