I am wondering if it is possible to debug/execute a Ocaml program step by step, for instance like debugging C++ programs in Visual Studio. In other words, I would like to run a Ocaml program line by line, also it would be great if we could "watch" the value of some variables.
By the way, I am using Emacs as editor.
Could anyone help? Thank you very much
Edit-1: As sepp2k suggested, I am trying to run camldebug under Emacs. I have a problem in the beginning: the web page mentions "The Caml debugger is started under Emacs by the command M-x camldebug
, with argument the name of the executable file progname
to debug." Actually I have only 3 choices:
M-x camldebug
M-x camldebug-mode
M-x camldebug-step
Edit-2: When I type M-x camldebug
, enter, it shows Symbol's value as variable is void: caml-mode-map
which does not allow me to enter the executable file.
Could anyone help? Thank you!
You can step through the code using the debugger ocamldebug, which can be run in emacs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With