elixir-lsp / vscode-elixir-ls

Elixir language support and debugger for VS Code, powered by ElixirLS.
https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls
MIT License
545 stars 105 forks source link

"Debug Tests" in "Testing" tab spins forever #359

Closed pertsevds closed 1 year ago

pertsevds commented 1 year ago

Is this the right repo?

I think yes.

Environment

Troubleshooting

Current behavior

When I try to run "Debug Tests" in "Testing" tab, icons just spins forever without any logs output.

screenshot

Simple "Run Tests" in "Testing" tab - works. mix test runs fine. When I try to run task "mix test" in "Run and Debug" tab debugging of test works.

Expected behavior

Debuging works when I try to run "Debug Tests" in "Testing" tab.

lukaszsamson commented 1 year ago

Can you share a minimal repo that reproduces this problem? Please post logs from vscode developer tools (Help->Toggle Developer Tools) and Debug console panel (View->Debug console). Note that due to elixir limitation debugged test do not exit the debugger after the test concludes.

pertsevds commented 1 year ago

Here is repo: https://github.com/pertsevds/dnstap/tree/main Here is the log: https://github.com/pertsevds/uploads/raw/main/vscode-app-1690288432563.log There is no output logged to Debug console. It's empty.

lukaszsamson commented 1 year ago

It looks like language rerver is not starting. Can you also share Output logs from elixir-ls? Your report is a bit confusing. Are you on windows or linux? If windows then downgrade to OTP25. OTP26 still has critical bugs. See https://github.com/elixir-lsp/elixir-ls/issues/886

lukaszsamson commented 1 year ago

I checked your repo and it's working on my machine (tested on macOS, OTP25 elixir 1.15.4)

Screenshot 2023-07-25 at 18 16 57
pertsevds commented 1 year ago

My local machine is Windows, but I'm using Remote SSH Extension to open folder on remote host that runs Debian 12. So it's Elixir on Linux.

I'll try OTP25 tomorrow.

Output logs from the elixir-ls:

Running /root/.vscode-server/extensions/jakebecker.elixir-ls-0.15.3/elixir-ls-release/launch.sh
Looking for ASDF install in /root/.asdf/asdf.sh
ASDF found, relaunching in bash shell
Looking for ASDF install in /root/.asdf/asdf.sh
Sourcing ASDF
Installing ElixirLS release v0.15.1
Running in /root/repos/dnstap
Install complete
[Info  - 8:24:54 PM] Started ElixirLS v0.15.1
[Info  - 8:24:54 PM] Running in /root/repos/dnstap
[Info  - 8:24:54 PM] ElixirLS built with elixir "1.15.4" on OTP "26"
[Info  - 8:24:54 PM] Running on elixir "1.15.4 (compiled with Erlang/OTP 26)" on OTP "26"
[Info  - 8:24:54 PM] Protocols are not consolidated
[Info  - 8:24:54 PM] Elixir sources not found (checking in /home/runner/work/elixir/elixir). Code navigation to Elixir modules disabled.
[Info  - 8:24:55 PM] Loaded DETS databases in 24ms
[Info  - 8:24:55 PM] Starting build with MIX_ENV: test MIX_TARGET: host
[Info  - 8:24:56 PM] Compile took 240 milliseconds
[Info  - 8:24:56 PM] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 8:24:56 PM] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 8:24:56 PM] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info  - 8:24:56 PM] [ElixirLS Dialyzer] Found 0 changed files in 90 milliseconds
[Info  - 8:24:56 PM] [ElixirLS Dialyzer] Analyzing 0 modules: []
[Info  - 8:24:56 PM] [ElixirLS Dialyzer] Analysis finished in 106 milliseconds
[Info  - 8:24:56 PM] Dialyzer analysis is up to date
[Info  - 8:24:56 PM] [ElixirLS WorkspaceSymbols] 30 callbacks added to index
[Info  - 8:24:57 PM] [ElixirLS Dialyzer] Writing manifest...
[Info  - 8:24:58 PM] [ElixirLS Dialyzer] Done writing manifest in 1731 milliseconds.
[Info  - 8:24:58 PM] [ElixirLS WorkspaceSymbols] 260 modules added to index
[Info  - 8:24:59 PM] Experimental server is disabled.
[Info  - 8:25:01 PM] [ElixirLS WorkspaceSymbols] 454 types added to index
[Info  - 8:25:09 PM] [ElixirLS WorkspaceSymbols] 5189 functions added to index
[Warn  - 8:25:21 PM] warning: variable "listen_socket" is unused (if the variable is not meant to be used, prefix it with an underscore)
  test/dnstap_test.exs:12: DnstapTest."test greets the world"/1
pertsevds commented 1 year ago

That's kinda strange bug. I'll look into it further and close this one.