godotengine / godot-vscode-plugin

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

Godot Editor is closed when VSCode is closed if opened using "Open workspace with Godot Editor" from VSCode #625

Open rktprof opened 3 months ago

rktprof commented 3 months ago

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:

Steps to reproduce

DaelonSuzuka commented 3 months ago

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.

rktprof commented 3 months ago

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.