Unknown C primitive unix_has_symlink in VSCode debugger


#1

I’m using the VSCode debugger for the first time.
So I compile my “debuggable_executable” file (I call it debugger.ocaml_debuggable), and launch the ocamldebug in VSCode’s integerated terminal, but I get the following error message :

If I do the same thing in a terminal outside VSCode, I don’t have this problem :

$ ocamldebug debugger.ocaml_debuggable
OCaml Debugger version 4.04.1

(ocd) r
Loading program… done.
Time: 369897
Program exit.

Note : my project only uses OCaml code, no C code.


#2

I have not context on the specific primitive mentioned (unix_has_symlink), but it stands out that your VSCode debugger uses version 4.02.3, whereas on the terminal, you’re using 4.04.1. I imagine that will make quite the difference (they seem minor version bumps, but they’re really rather sweeping changes from minor to minor).


#3

Indeed, you have a version mismatch - unix_has_symlink was added (by me, as it happens) in 4.03.0 so a 4.02.3 debugger won’t load it.