At link time record the paths used to locate various compilation artifacts; these could then be used to augment the .cmt search path in the debugger. This should mean that OPAM-installed packages with .cmt files in their install dir should be able to be compiled without OPAMKEEPBUILDDIR=true and yet still be debuggable.
OTOH, source files are needed too for debugging. Is it reasonable to expect those to be present in the install dir?
At link time record the paths used to locate various compilation artifacts; these could then be used to augment the .cmt search path in the debugger. This should mean that OPAM-installed packages with .cmt files in their install dir should be able to be compiled without OPAMKEEPBUILDDIR=true and yet still be debuggable.
OTOH, source files are needed too for debugging. Is it reasonable to expect those to be present in the install dir?