- Elixir & Erlang versions (elixir --version):
- Erlang/OTP 25
- Elixir 1.14.1 (compiled with Erlang/OTP 23)
- Elixir Language Server version:
- Operating system:
- macOS 13.0.1 (22A400)
- Editor or IDE name (e.g. Emacs/VSCode):
- Emacs 29
- Editor Plugin/LSP Client name and version:
- Emacs lsp-mode/dap-mode
Using dap-mode in elixir, when I attempt to start up
dap-debug, it throws an error saying:
Searching for program: No such file or directory, debugger.sh
There are no logs in my Messages buffer beyond the one mentioned earlier. There are not messages beyond the startup messages in the lsp-log buffer. elixir-ls, elixir-ls::stderr, and Elixir::Run stderr buffers are empty
I suspect that my emacs config is not putting the lsp-related files where they are expected to be. To deal with that, I updated the
dap-register-debug-template to explicitly state where the elixir-ls files are. It looks like this:
(dap-register-debug-template "Elixir::Phoenix" (list :type "Elixir" :task "mix phx.server" :request "launch" :dap-server-path '("~/.emacs.d/.cache/lsp/elixir-ls/debugger.sh") :name "Elixir::Phoenix"))
Upon doing that, it could find debugger.sh, but the project itself fails to find my Repo to run tests, and I get the following error:
Started ElixirLS debugger v0.11.0 Elixir version: "1.14.1 (compiled with Erlang/OTP 23)" Erlang version: "25" ElixirLS compiled with Elixir 1.11.4 and erlang 22 (Debugger) Initialization failed because an exception was raised: ** (RuntimeError) could not lookup Ecto repo Reel.Repo because it was not started or it does not exist (ecto 3.9.2) Elixir.Ecto.Repo.Registry.erl:22: Ecto.Repo.Registry.lookup/1 (ecto_sql 3.9.1) Elixir.Ecto.Adapters.SQL.Sandbox.erl:572: Ecto.Adapters.SQL.Sandbox.lookup_meta!/1 (ecto_sql 3.9.1) Elixir.Ecto.Adapters.SQL.Sandbox.erl:458: Ecto.Adapters.SQL.Sandbox.mode/2
This makes me think it isn’t picking up my mix config or something. I am likely doing something wrong, or my emacs config is inadequate; however, I have no idea where to even start. Does anyone have any ideas?
here is my emacs config. The project doesn’t seem to matter. I have this problem with a startup hello-world. Even suggestions on how to troubleshoot would be appreciated. Thanks.
I expect the debugger and to be able to debug my project.