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

Debugger cannot start: ERR timeout after 1000 ms: Error: timeout after 1000 ms #114

Closed
ctataryn opened this issue Jul 4, 2020 · 5 comments

Comments

@ctataryn
Copy link
Contributor

ctataryn commented Jul 4, 2020

Environment

Most of this can be filled out by running the VSCode command (by default bound to Ctrl+Shift+P) "ElixirLS: Copy Debug Info"

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 22 [erts-10.7] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]
    Elixir 1.9.4 (compiled with Erlang/OTP 20)

  • VSCode ElixirLS version: 0.4.0

  • Operating System Version: win32 10.0.18363

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

Crash report template

After upgrading from v0.4.0 -> v0.5.0 debugging has stopped working. The Developer's Console states:

  ERR timeout after 1000 ms: Error: timeout after 1000 ms
    at t.RawDebugSession.handleErrorResponse (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3160:190)
    at file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3159:451
    at async t.RawDebugSession.shutdown (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3157:536)

Using git bisect I was able to track it down to this specific commit:

97066ce

My guess is, perhaps on Windows machines, the workspace scanner times things out? The strange thing is, even on a relatively empty project (i.e. generated from mix phx.new myproj) it still does this.

@axelson
Copy link
Member

axelson commented Jul 4, 2020

@ctataryn thanks for this! So with the change in #115 you don't get the ERR timeout?

@jayjun do you know of any other workarounds we could use to avoid **/*.ex? Although perhaps the better fix would be to change the command to return a simple error if the extension isn't started.

For reference #107 was originally created to improve the Copy Debug Info command: #70 (comment)

@jayjun
Copy link
Contributor

jayjun commented Jul 4, 2020

The problem is there is no opportunity to return an error. Copy Debug Info is registered as globally available by contributes.commands at launch but the extension isn’t started (thus registering any handlers) until an Elixir file is opened.

However, you can conditionally enable it with a when clause. This should do it.

"commands": [
  {
    "command": "extension.copyDebugInfo",
    "title": "ElixirLS: Copy Debug Info",
+   "when": "editorLangId == elixir"
  }
]

The drawback is users must be instructed to have an Elixir file opened to access that command, say before filing a bug report.

@ctataryn
Copy link
Contributor Author

ctataryn commented Jul 4, 2020

thanks for this! So with the change in #115 you don't get the ERR timeout?

That's correct. The commit before this one works, and everyone afterwards fails with the timeout.

@axelson
Copy link
Member

axelson commented Jul 4, 2020

However, you can conditionally enable it with a when clause. This should do it.

Okay, that seems like a good approach 👍

@axelson
Copy link
Member

axelson commented Jul 4, 2020

Fixed in #115

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

3 participants