Skip to content
Simon Krajewski edited this page Jan 17, 2022 · 2 revisions

Using a debugger

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);

There are lots of other stringifying functions, search for "Printing" in src/core/type.ml and scroll down to find them.