Debug Macros


(Adrian V) #1

when I remember it correctly, at the last Haxe summit, Simon showed that it is possible from inside VSCode to debug macros with the new eval target.
If this is really possible, what settings do I need to enable this ?

(Dan Korostelev) #2

Hi, yes, it’s really possible, there’s debugging support in the eval interpreter, but we never settled with the final protocol for the debugger UI interaction, so the VSCode extension wasn’t released yet. Still, it’s usable and actually helps, so I think I’ll prepare an alpha version of the extension with “can break with newer Haxe” note and write some README.

(Adrian V) #3

Great - thanks

(Marcelo Serpa) #4

Any news about the debugging extension? I have a somewhat complicated macro and I’d love to test-drive the new macro debugger. Is it documented somewhere?

(Dan Korostelev) #5

Not yet, sorry. I had some issues with building the debug extension with latest vscode libs due to ES6 class incompatibilities and I haven’t got enough time to figure it out yet.

(Mark) #6

You can enable stacktraces with -D eval-stack which already helps with debugging, using Haxe 4 preview.

(Marcelo Serpa) #7

@mark.knol Thanks! That’s helpful.

@nadako What ES6 class incompatibility, could you cite an example? Couldn’t that be solved with

(Dan Korostelev) #8

IIRC it was about not being able to extend the ES6 class using ES5 way to call the super constructor which Haxe currently generates, so it’s basically Unfortunately I don’t have time to work on this at the moment because of the new job, but once I settle down a bit I’m going to get back to the issue.