godot-csharp-visualstudio
godot-csharp-visualstudio copied to clipboard
Editor crash or disconnect with Play in Editor, every other time
Using the workaround described in #10 to get the build options to show, using Play in Editor will work the first time, triggering a build in the editor and launching the game, as expected.
However, by closing the game window, changing a script, and repeating Play in Editor, immediately after either Visual Studio will complain about disconnecting from the editor ("No Godot editor instance connected") or the editor itself will hard crash, while the game window itself launches just fine. Seems to be 100% reproducible. If it complains about a disconnect, doing Play in Editor again will get it to work as expected, but the same thing happens with the next build.
Happens in any project, including simple one-script tests. Nothing weird in the output console in Visual Studio, and no consistent error in the Godot console or logs, it usually just silently fails, but I'll include a couple. New to Godot and don't really know how to debug this, so would appreciate some help.
Problems with "Play in Editor" randomly disconnecting from/crashing the Godot editor Confirm this bug.
Not necessary it is totally related to this issue. This happens often for me too. Adding here to speed up feedback cycle leading to a more robust VS2022 experience.
Yes, I believe it to be related as well. I'm not sure what happened (I think it was after a Godot or VS update), but I stopped getting reliable silent editor crashes after the game window launches, and now instead I get the Exception popups as described in #6, (along with "No Godot editor instance connected") errors - and it's seemingly random, whereas with this it was reliable, every single time.
As described, I'll still get a silent editor crash once in a while. When it doesn't crash, it will eventually work after a few attempts, but it's infuriating to not be able to reliably launch into a debug session, especially when this has been going on for months and getting the extension to work at all requires a janky workaround (at least in VS19, I don't know how it is in the more recent VS22 extension)