Closed ParadoxV5 closed 2 months ago
Yes, random port number
Headless LSP mode uses a random, high, unoccupied port because the entire purpose is to allow you to open multiple Godot projects in separate VSCode windows without port conflicts.
I suspect that the problem is that you changed godotTools.lsp.autoReconnect.attempts
to 2 from it's default value of 10. Starting the engine (even in Headless mode) can easily take more than 6 seconds, so I don't know why you would set the attempts to 2.
Thank you for your explaination.
Starting the engine (even in Headless mode) can easily take more than 6 seconds, so I don't know why you would set the attempts to 2.
I expected the connection to be consistent in cases where it should suceed (not considering boot duration vs. timeout). I dropped this setting to reduce attempts on cases where it should fail (e.g., #696)
Did fixing godotTools.lsp.autoReconnect.attempts
solve your problem?
Seems that it is because of the slow startup time of the lang.server. With 10 attempts, there was no error message. With 2 attempts, it eventually succeds after clicking reconnect half a dozen times.
Opening the settings window is a placebo because it took time.
Yes, that's why the default value is 10.
@ParadoxV5 Are you still experiencing a Language Server connectivity problem?
@ParadoxV5 Are you still experiencing a Language Server connectivity problem?
I have not had connectivity problems recently; but I would like the plugin adjusted to not have to rely on a large number of reconnect attempts.
but I would like the plugin adjusted to not have to rely on a large number of reconnect attempts.
No.
Godot version
v4.3.stable.steam [77dcf97d8]
VS Code version
Version: 1.93.0 (system setup)
Godot Tools VS Code extension version
v2.1.0
System information
Windows 11
Issue description
The extension fails with a random port number
unless it’s reloaded after opening the VSCode Settings window(placebo) until half a minute after Godot Engine starts.Yes, random port number, differing each failed retry, as if reading from an uninitialized
uint16
.Steps to reproduce
I opened my project VSCode (from Godot or manually) after opening it in Godot Editor.
settings.json