-
Notifications
You must be signed in to change notification settings - Fork 470
Provide BUILD_PATH_PREFIX_MAP support for ocamldebug #7414
Description
Desired Behavior
Unless inhibited, Dune currently uses a BUILD_PATH_PREFIX_MAP to map build-time absolute paths to reproducible paths, starting with /workspace_root. The result is that the ocamldebug debugger cannot find the sources.
This is a request for Dune to produce a feature to enable starting ocamldebug with a BUILD_PATH_PREFIX_MAP that will perform the logical inverse of the other mapping, so that /workspace_root is mapped in a way to enable the debugger to find the sources, and perhaps other installed artifacts. (ocamldebug is in the process of being modified to honor BUILD_PATH_PREFIX_MAP, see ocaml/ocaml#12126)
Example
One possible interface example is to just add an --ocamldebug option to dune exec. So a command like
dune exec --ocamldebug ./bin/main.bc
would start to execute that program in the ocamldebug debugger.
I'm currently experimenting with implementing such a feature.