You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To debug the Haxe compiler, you can use either a system debugger (gdb/lldb), or ocamldebug. ocamldebug provides a better debugging experience. To use it, uncomment (modes byte) from src/dune and recompile.
Using printf
To print information about a type, you can add the following before most lines:
Printf.printf "%s\n" (s_type_kind t);
To print specific data structure, you can see other functions with s_ prefix, or check Printer.s_* functions
There are lots of other stringifying functions in src/core/tPrinting.ml. If specific data structure is not there, you can try to convert it to json first:
let jctx =Genjson.create_context GMFullinlet json = (Genjson.generate_anon_status jctx anon.a_status) in
print_endline (Json.string_of_json json);
If you want to get stacktrace of current call without debugger, you can add die "" __LOC__; to crash compiler on specific line.