vscode-elixir-ls icon indicating copy to clipboard operation
vscode-elixir-ls copied to clipboard

debugging with "Debug Test" option gets killed after a minute

Open thomasdziedzic opened this issue 1 year ago • 0 comments

Is this the right repo?

I believe this is the right repo, because the fallback config for running "Debug Test" with is vscode specific.

Environment

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Elixir 1.16.1 (compiled with Erlang/OTP 26)

  • VSCode ElixirLS version: 0.20.0
  • Operating System Version: linux 5.15.79.1-microsoft-standard-WSL2+

Troubleshooting

  • [x] Restart your editor (which will restart ElixirLS) sometimes fixes issues
  • [x] Stop your editor, remove the entire .elixir_ls directory, then restart your editor

Problem description

After a minute, when in the Debug Test mode, my debugging session gets killed and I get the following message on my test:

     ** (ExUnit.TimeoutError) test timed out after 60000ms. You can change the timeout:

       1. per test by setting "@tag timeout: x" (accepts :infinity)
       2. per test module by setting "@moduletag timeout: x" (accepts :infinity)
       3. globally via "ExUnit.start(timeout: x)" configuration
       4. by running "mix test --timeout x" which sets timeout
       5. or by running "mix test --trace" which sets timeout to infinity
          (useful when using IEx.pry/0)

     where "x" is the timeout given as integer in milliseconds (defaults to 60_000).

     stacktrace:
       (debugger 5.3.3) dbg_debugged.erl:42: :dbg_debugged.msg_loop/2
       (ex_unit 1.16.1) lib/ex_unit/runner.ex:472: ExUnit.Runner.exec_test/2
       (stdlib 5.2) timer.erl:270: :timer.tc/2
       (ex_unit 1.16.1) lib/ex_unit/runner.ex:394: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

I think the fix here is to add --trace to the arguments so that it doesn't time out to this line https://github.com/elixir-lsp/vscode-elixir-ls/blob/02fb46c9eb8a2ebbeb22ed8b70c233924dc32df1/src/commands/runTest.ts#L78

thomasdziedzic avatar Feb 28 '24 13:02 thomasdziedzic