I’ve been scratching my head because earlier this week I accidentally had working breakpoints (in .ml
source files) for native code in Visual Studio Code. Kinda flabbergasted that I’ve been using OCaml for two years and never knew I could do that.
Just for Linux and macOS, not Windows, although I think I understand the (small) gap on Windows. And no printing of the runtime value
type yet.
If there is interest, I can figure out how to post a show and tell video on YouTube. Definitely for intermediate-to-advanced OCaml users only though: my setup involves the -output-complete-obj
and I’m using my DkSDK product to tweak a zillion things. But underneath it is just options in the C + ASM compiler, the OCaml compiler and Dune which I can show, and perhaps it may motivate someone to wrap it up in a friendly way for beginners. And perhaps it will motivate someone to wrap up a runtime value
printer [1] using natvis.
And perhaps it is already common knowledge! If not, “like” this post so I can get a sense if it is worth spending time on a video.
[1]: Bonus: A real pretty printer if the sibling value
in a C stub function was a LexiFi/refl
/etc. RTTI value
.