godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.57k stars 168 forks source link

Can't Connect to GDScript Language Server #455

Closed Luzzotica closed 1 year ago

Luzzotica commented 1 year ago

Godot version

4.0.rc6.mono

VS Code version

1.75.1

Godot Tools VS Code extension version

1.3.1

System information

MacOS Monterey 12.2.1

Issue description

VSCode is saying it cannot connect to the GDScript language server at 127.0.0.1:6008

My Godot editor is running. I've tested this multiple times.

I really want to be able to write my C# and GDScript code in VSCode: Having multiple windows is SUPER nice, and lets me work much faster.

I tried setting up the debugger, but when I opened my command palette the Open launch.json wouldn't pop up for me. I noticed that in the debugger is says it defaults to port 6007. Perhaps this is my issue?

Looking for a little bit of guidance. Sorry if this question feels mundane.

Steps to reproduce

I am not sure.

DaelonSuzuka commented 1 year ago

In Godot 4, they changed the default LSP port from 6008 to 6005. I recommend going into your editor settings in Godot and changing the port back to 6008.

image

mikemklee commented 1 year ago

I ran into the same issue on Godot 4. I kept the Godot editor settings as-is, and instead modified the port in the extensions setting in VS Code, setting it to 6005.

image

DaelonSuzuka commented 1 year ago

I ran into the same issue on Godot 4. I kept the Godot editor settings as-is, and instead modified the port in the extensions setting in VS Code, setting it to 6005.

Doing this doesn't help you if you still have to work on both Godot 3 and Godot 4 projects.

mikemklee commented 1 year ago

Doing this doesn't help you if you still have to work on both Godot 3 and Godot 4 projects.

If that case, you can modify the extensions setting on the workspace level, instead of on the user level. Assuming each Godot project is its own VSCode workspace.

DaelonSuzuka commented 1 year ago

Remembering to do that across dozens of projects is pointless compared to just changing the port setting in Godot.

mikemklee commented 1 year ago

haha fair

Luzzotica commented 1 year ago

Thank you for the conversation! That was awesome!

I'm going to close this conversation, as my question was 100% answered. Thank you!