Is it possible to debug (step-through) expanded Haxe macro code?

80 Views Asked by At

This one is for build macros but would appreciate answer for other macro types as well.

I'd like to step-through the generated code by @:autoBuild(hxparse.ParserBuilderImpl.build()), eval debugger doesn't seem to work for this case. Even more specifically, I'd like to see which part of the code causes (WUnusedPattern) This case is unused but would prefer more generic answer.

1

There are 1 best solutions below

1
bwkam On

If you're using VSCode, you can add this to your launch.json

{
  "name": "Haxe Interpreter",
  "type": "haxe-eval",
  "request": "launch",
  "preLaunchTask": "launch task here",
},

then add a breakpoint, and start the debugging session.