COMMUNITY

How to debug hashlink in vscode?

after install everything in debug environment,
lauch debug ,but still not work

how to config launch.json? type=“what?”

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Haxe Interpreter",
			
			"request": "launch",
			"args": ["build.hxml", "--interp"]
		}
	]
}

build.hxml

//------------------------
-cp src

-hl bin/sangong.hl

-lib ds


-main MainServer

-D SERVER

-D Debug

Here’s an example: HaxeRepro/launch.json at c4061a64456c1f2a994dbcdd43e169339e37cf97 · Gama11/HaxeRepro · GitHub

I’m copy your tips to lauch.json

and run HashLin/JIT

vscode give an waring box :slight_smile:
could not find the task “HL/JIT (debug)”

I click debug anyway ,it can jump into breakpoint.

wow ,thank you Gama11

The preLaunchTask property link to a task you want to run before starting debugging,
here it refers to this one HaxeRepro/tasks.json at c4061a64456c1f2a994dbcdd43e169339e37cf97 · Gama11/HaxeRepro · GitHub which is used to build the code.

thank you ,I’ll try