Godot 4.0 crashes if game window closed while debug break
Godot version
4.0b6
System information
Windows 10
Issue description
In 3.x if the game breaks during a debug error, you could close the game window and go back to Godot to fix the issue, but since 4.0 if you try to X the game window while it's running, it crashes and hangs until windows has to force it to close.
Steps to reproduce
- Run a game in godot
- Wait until debug error causes the game to halt
- Close the game window
Minimal reproduction project
Not reproducible on Ubuntu 20.04
@elvisish Please upload a minimal reproduction project to make this easier to troubleshoot.
@elvisish Please upload a minimal reproduction project to make this easier to troubleshoot.
I literally did?

Still broken on beta 10.
Still doing this on 4.0.2 stable.
Still on 4.0.3 RC2.
Still on 4.1.1 stable.
This could probably be worked around by disabling the handling of quit requests just before performing a debug break (and restoring the previous state when resuming).
Note that pressing F8 or the Stop button in the editor doesn't send a quit request. It kills the process instead, so that functionality will keep working regardless.
Still happens on 4.2 stable.
Still happens on 4.3 beta 2.