You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Another option might be to have a dune ocaml debug command.
That is also being considered. Since debugging is also executing the program, whatever benefit dune exec brings over directly invoking the program, we would want to bring those same benefits to dune debug.
Besides setting a map and invoking the debugger, we would want an option to just print out the maps, both the build-time map and the deployment-time map.
We would also want to support other debuggers, e.g. the earlybird debuggers (if it gets updated for the latest ocaml).
In terms of UI I think a first implementation should use dune debug or dune ocaml debug. The implementation can share as much code as needed from dune exec of course. If support for other debuggers comes around, the CLI can be rediscussed, but it is unlikely that ocamlearlybird would be wholly supported from Dune, as it needs editor integration, it looks more like a job for ocaml-lsp (with some help of Dune, but what form this help should take is not known at this point.)
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 theocamldebug
debugger cannot find the sources.This is a request for Dune to produce a feature to enable starting
ocamldebug
with aBUILD_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 honorBUILD_PATH_PREFIX_MAP
, see ocaml/ocaml#12126)Example
One possible interface example is to just add an
--ocamldebug
option todune exec
. So a command likewould start to execute that program in the
ocamldebug
debugger.I'm currently experimenting with implementing such a feature.
The text was updated successfully, but these errors were encountered: