godot-vscode-plugin
godot-vscode-plugin copied to clipboard
Godot Editor is closed when VSCode is closed if opened using "Open workspace with Godot Editor" from VSCode
Godot version
4.2.1
VS Code version
VSCodium 1.87.1
Godot Tools VS Code extension version
2.0.0
System information
macOS 14.4
Issue description
If Godot is opened with the "Open workspace with Godot Editor" closing VSCode will also instantly close Godot (discarding any unsaved changes) which is really annoying since VSCode updates often and restarting VSCode in order to update will also close Godot.
This might be a fringe case but it happens to me quite often because the fastest way of opening a project in Godot is to use the "Open workspace with Godot Editor" button in VSCode that shows up when it disconnects from the LSP.
Reasons I use that button daily:
- Godot editor prevents sleep on macOS, so I close it at the end of the day
- Frequently having to restart the editor because of: https://github.com/godotengine/godot/issues/88399
- Godot editor crashes a lot
Steps to reproduce
- Open your project in the Godot Editor
- Open a script file in VSCode
- Close the Godot Editor
- Click the "Open workspace with Godot Editor" button in the popup that shows up in VSCode
- Wait for Godot to open
- Close VSCode (or restart it because of an update)
- The Godot editor will also close
This is actually the intended behavior at the moment, but I can see how that's problematic for your workflow.
There is currently another problem with child processes not being killed properly, especially on MacOS. When I fix that I'll look into improving this and maybe making the 'kill on exit' configurable.
This is actually the intended behavior at the moment, but I can see how that's problematic for your workflow.
There is currently another problem with child processes not being killed properly, especially on MacOS. When I fix that I'll look into improving this and maybe making the 'kill on exit' configurable.
Ok, having it configurable sounds good.
But even if 'kill on exit' is enabled it would be nice if we could avoid discarding unsaved changes in Godot. Because I thought this was a random bug that crashed the editor until I made the connection that it was related to how I started it, and even knowing why it closes sometimes I rarely remember which method I used to start Godot.
I don't know if it's something this plugin can/should handle or if it's the editor itself though, but maybe the bug is that it discards the unsaved changes.