Debug mode with rescript 11.0

Does the debug mode flag -bs-g work with rescript 11.0? I’m getting some weird errors when I use it.
Fatal error: exception File "jscomp/core/js_dump.ml", line 828, characters 29-35: Assertion failed

Is there any point in the debug mode now?

I was hoping to print a better type format in the console logs

I have removed the files that were causing the errors but I still can’t get a nice type format in the console. I have enabled Custom formatters in Google Chrome devtools.

So about the issue, it at least is a known one: js_dump.ml build error when using `String(string)` variant in untagged union with other tag · Issue #6495 · rescript-lang/rescript-compiler · GitHub

I don’t think it would improve how that variant is printed anymore, since variant tags went from being compiled to integers to strings that contain the tag name already.

I understand. It would be nice if we could format logs from rescript the way rescript would rather than javascript similar to what the Elm debug helper extension for Chrome does it.

1 Like