Debug mode questions
So I've been playing around with this plugin have a few questions about using debug mode:
First, I originally put a breakpoint on line 8, but instead of line 8 it stops at line 9 (but if I put the breakpoint at line 7 it will correctly stop at line 7. Also, is there currently no support for viewing the current values of variables in the sidebar?
Hello, @ArunPidugu
The debug support is depend on ocamldebug. The breakpoint sometimes can't be set to desired position is ocamldebug's limitation. You can try set column breakpoint (Shift + F9) instead of just line breakpoint. And there is no way to list variables when debugging. You can put cursor hover on variable to see it's value.
Now I'm working on a fresh new debug support by implement it in pure ocaml and directly use (skip ocamldebug) https://github.com/ocaml/ocaml/blob/trunk/byterun/caml/debugger.h protocol. As now I can see it solves a few problems that can't be solved by using ocamldebug, such as Next command (F10) sometimes step in a function, etc.
You can track the progress by watch the project https://github.com/hackwaly/ocamlvsdebug
I've tested that list variables in stack is possible (in new debug implementation).

I'd love to check it out. I can see the ocaml project in the repo you linked, but how do I integrate it with VSCode?
@nadako It is incomplete. If you'd like to try. Checkout the master branch of ocamlvsdebug. See the ${workspaceRoot}/.vscode/launch.json file. In vscode press F5 will launch ocamlvsdebug in server mode. Then you add a "debugServer": 4712 option to the launch.json of your test ocaml project. You can now use the ocamlvsdebug to debug your test ocaml project.