I’m relatively new to Haxe and currently working on a cross-platform project. I’m finding it a bit challenging to debug efficiently across different targets (JavaScript, C++, etc.).
I’ve been using javascript with -D source-maps, so haxe generate source maps, these source maps work with vscode both from js debug terminal, and with chrome debugger, so it was very solid.
VS code has a feature to switch from the haxe to the javascript code (enable/disable source map stepping) so in case something didn’t made sense, I was jumping to the js code to see the real variable/function names etc.
The quistion you mentioned, have been debugged using Visual Studio on the generated cs code, not on the haxe code.
A few years ago when I sought mentioned on the haxe docs, that the trace function (can be later removed with -D no-traces) is very good for debugging, it made me think that such a statement could be written only on absance of real runtime debuggers, however as you see there are many good options for debugging.
As with any OOP language, it is very easy to seperate the logic in classes, and use these classes #1 from the main class #2 from the unit tests #3 from the debugger,.
In haxe you can write the classes cross platform, your main in your language of runtime, tests in a language with good testing tools, debug them in javascript so you have good tools.
I’ve been using Chrome debugger with VS Code. I didn’t have much luck with the Firefox one. You have to make sure you launch Chrome in debugger mode, then use the “Connect” command in VS Code. /Applications/browsers/Google\ Chrome.app/Contents/MacOS /Google\ Chrome --remote-debugging-port=9222