godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.48k stars 148 forks source link

Failed to launch Godot instance on VSCode #546

Closed CapitaoFantastico closed 7 months ago

CapitaoFantastico commented 7 months ago

Godot version

4.2 Stable

VS Code version

1.85.0

Godot Tools VS Code extension version

1.3.1

System information

Windows 11

Issue description

I download Godot 4.2 and tried to configure VSCode to use it. But when i tried to run do project from VSCode i received that error:

Failed to launch Godot instance: Error: Command failed: "C:\apps\Godot_v4.2-stable_win64.exe\Godot.exe" --path "D:\godotProjects\ReTetris" --remote-debug 127.0.0.1:6007

LSP Server connect with no problem. When i open VSCode without open Godot, i receive the message below and if i click to open, they open Godot normally: image

image

Editor Path image

launch.json image

Debug Server: image

Steps to reproduce

microBob commented 7 months ago

It looks like you've configured the "Remote Port" in Godot to broadcast on port 6007 (your last pic) but in VSCode you've configured the addon to listen to port 6005 (3rd pic). Make sure these two match. Also, your launch script is using 6007, so just make sure those match.

CapitaoFantastico commented 7 months ago

the 3rd pic are the language server config and works fine when when i open Godot and VScode

image

image

The problem occour when i tried to run the project:

image

microBob commented 7 months ago

Ah ok. On line 12 of your launch script, it looks like you're still trying to use port 6007. Try changing that to 6005.

DigiBanks99 commented 7 months ago

I've set the debug port to 6005 and configured my launch.json to use 6005 and I get the same error as OP:

image image image

DigiBanks99 commented 7 months ago

My issue was solved by this workaround mentioned in #389

CapitaoFantastico commented 7 months ago

My issue was solved by this workaround mentioned in #389

Solved with this solution, thanks!

btw this solution needs to be on the plugin's documentation

Thanks to everybody

DaelonSuzuka commented 7 months ago

btw this solution needs to be on the plugin's documentation

Most of the extension's debug features don't actually work if you use the debugServer "workaround". If you're happy with your experience using it, that's fine, but I'm not going to recommend it and there's no way it's going in the documentation.

DigiBanks99 commented 7 months ago

So, should this be opened again or will #389 serve as tracking?

DaelonSuzuka commented 7 months ago

What's there to track? The people in that thread are clearly satisfied, so why is it my place to barge in and tell them that they're having fun the wrong way?

My only opinion is specifically in response to the idea of putting that non-solution in the documentation.

atirut-w commented 7 months ago

The people in that thread are clearly satisfied, so why is it my place to barge in and tell them that they're having fun the wrong way?

I think you should slow down a bit there. Yes, they found the workaround to be satisfactory, but the feature still doesn't work as intended, yes? There's no rush, but it wouldn't be good if this issue goes unfixed either.