godotengine / godotengine/godot-vscode-plugin

Not working with Flatpak VS-Code

Open
#743 0 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

### Godot version

v3.2.3.stable

### VS Code version

1.94.2 Flatpak

### Godot Tools VS Code extension version

v2.3.0

### System information

Debian Stable

### Issue description

The Plugin always reports

`Cannot launch debug session: '/home/.../my_game/godot3' is not a valid Godot executable`

now, this is to be expected, as godot3 is not on the path of the sandboxed vs code, so i tried fixing this by setting the executable path to:

`/usr/bin/flatpak-spawn --host godot3`

but it still reports:

`Cannot launch debug session: '/usr/bin/flatpak-spawn --host godot3' is not a valid Godot executable`

but i assumed the way the executable is set with the --host flag and such might interfer with the way the plugin checks for the correct version, so i wrote a wrapper script

```
#!/bin/bash
/usr/bin/flatpak-spawn --host godot3 "$@"
```

and set this wrapper script as the executable, which still didn't work. I got it to work though by adding an `echo ""` to my wrapper script.

Now everything works fine. Debugging with breakpoints etc.
By naming the script "godot3" and putting it in the project root it even works with the default settings out of the box.

Of course, I don't think that should be the recommended way of getting the godot plugin to work with flatpak vs code, thus I#m still reporting this as a bug.

### Steps to reproduce

Should happen always if you have flatpak vs code, this plugin and try Run and Debug

Contributor guide

Open the contributing guide

Research direction

Start by reproducing Run and Debug from Flatpak VS Code with the reported wrapper and inspect the executable validation and debug-launch path. Confirm the behavior with the direct flatpak-spawn command and wrapper, then make the launch work without requiring an added echo in the wrapper script.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.