-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit bytecode in dune build for debugging #144
Conversation
It should be noted that the generated
So perhaps these changes must be paired with logic to avoid bundling it into the zip file. Although looking at the |
9b45372
to
457dd74
Compare
Signed-off-by: Andrew Helwer <[email protected]>
Signed-off-by: Andrew Helwer <[email protected]>
Signed-off-by: Andrew Helwer <[email protected]>
@kape1395 what do you think of these changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
As I see, the bc file is not in the release.
@kape1395 actually I think these changes should be reverted, because after a few weeks playing around with the OCaml debugger I have found it is just too immature to use as a development tool and the utop REPL should be used instead. This seems to be the general idea in the OCaml community as well. |
@ahelwer, I would like to keep the changes. Even if they are not that useful today, they don't harm anyone either. |
All right, although in order to be able to actually set breakpoints (in some places) you need this dune parameter set to false (it's true by default), and I don't know whether we want that: https://dune.readthedocs.io/en/stable/reference/dune-project/map_workspace_root.html |
This will generate a
tlapm.bc
OCaml bytecode file in_build/default/src
which can be loaded byocamldebug
. Dune 2.0+ requires this to be explicitly specified (docs):ocamldebug
also requires everything to be built with the-g
flag, which is the case by default with Dune; see output ofdune printenv .
.Ref #143
I also added a debug launch profile for VS Code, and added the earlybird DAP server to the
opam-deps-dev
make target.