# Enhancing Ocaml Debugging Experience in Visual Studio Code

**URL:** <https://discuss.ocaml.org/t/enhancing-ocaml-debugging-experience-in-visual-studio-code/12236>\
**Category:** Learning\
**Tags:** ocamldebug, compiler, opam, build, dune\
**Created:** [May 26, 2023, 1:19pm UTC](https://discuss.ocaml.org/t/enhancing-ocaml-debugging-experience-in-visual-studio-code/12236 "2023-05-26T13:19:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)\
**Post date:** [May 26, 2023, 5:31pm UTC](https://discuss.ocaml.org/t/enhancing-ocaml-debugging-experience-in-visual-studio-code/12236/4 "2023-05-26T17:31:30Z")

</div>

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](https://diskuv.com/cmake/help/latest/) 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](https://code.visualstudio.com/docs/cpp/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`.

---

_[View the full topic](https://discuss.ocaml.org/t/enhancing-ocaml-debugging-experience-in-visual-studio-code/12236)._
