I'm trying to use the ocaml debugger to display variables at runtime from emacs. When I use the middle mouse button, as suggested by this guide my system just pastes from the clipboard. When I try to explicitly use the display command on a variable, I get
Cannot find module Core.Std
I have no problems with this when I compile using corebuild, so I know I have Core installed. Also, when I explicitly use the directory command to add the libraries for core and core_extended, it properly displays the variable. Is there some better way to make this work?
To print values ocamldebug
needs to have the .cmi
file containing the value's type in its search path. You can add directories to the search path using -I
command-line arguments or the directory
command.
Whilst ocamlfind
doesn't seem to support ocamldebug
directly, you can still use it to pass the correct -I
arguments using the following command-line:
ocamldebug `ocamlfind query -recursive -i-format core` foo
where foo
is the program being debugged.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.