Skip to content
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

Using earlybird with Emacs and dap-mode #66

Open
tmcgilchrist opened this issue Jul 31, 2024 · 0 comments
Open

Using earlybird with Emacs and dap-mode #66

tmcgilchrist opened this issue Jul 31, 2024 · 0 comments

Comments

@tmcgilchrist
Copy link
Contributor

It would be worth adding documentation for describing how to get earlybird working with dap-mode in Emacs.

Using dap-mode plus dap-ocaml it is possible to start a debugging session. The configuration I have uses use-package and looks like:

; Require dap-mode plus dap-ocaml
(require 'dap-mode)
(require 'dap-ocaml)

; Setup key bindings using use-package.
(use-package dap-mode
  :bind (("C-c M-n" . dap-next)
         ("C-c M-s" . dap-step-in)
         ("C-c M-a" . dap-step-out)
         ("C-c M-w" . dap-continue)))

Then you need to create the correct launch.json which is not automated at the moment. I've been manually creating files like so (swapping in the program name as necessary):

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "OCaml earlybird (experimental)",
            "type": "ocaml.earlybird",
            "request": "launch",
            "program": "./_build/default/fib.bc",
            "stopOnEntry": true,
            "cwd": "${workspaceFolder}"
        },
    ]
}

I posted my setup here https://lambdafoo.com/posts/2024-03-25-ocaml-debugging-with-emacs.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant