Version
Godot Version 4.5
Visual Studio 2019 Community Edition
Question
So finally, for the first time since 2019 I was able to get Godot working with Visual Studio Code, to hit break points using this tutorial (I guess they key I was missing on this version was the json file). I have yet to try it out on the versions of Godot after 4.3, but assuming future versions haven’t completely obliterated this method of debugging (which may be the case), this is going to be a huge game changer for me going forward.
However, I still have a problem. I can’t get Godot to run in Debug Mode. By which I mean Godot ITSELF. I’m trying to build the editor with mono enabled (literally C# enabled), my last pull request was about a week ago, and I’m trying to use Visual Studio 2019 Community Edition (VS). But I’m getting strange results.
If I try to build the project in VS, it says that the build failed, and asks if it should run the last successful build. If I say yes, godot.windows.editor.dev.x86_64.mono.exe (which I built from the command line using SCons) starts to run, and all my break points become white on the inside with warnings saying that the break points will not be hit. But as the program is loading the break points turn back to normal, and the first one is hit moments later. The debugger then continues to work until I attempt to open a project at which point the program is promptly detached from VS without a trace.
So what gives; why can’t I build my project in VS even though the project files were generated by SCons as per directions? How is it, that despite this, it still goes into debug mode proper even when it, itself seems to indicate it won’t be able to do this (although this isn’t the first time VS has suddenly changed its mind on what break points will be hit, on second thought this might just be something to ignore)? And most importantly, how do I stop the process from detaching after I open a project, so I can continue to use Debug Mode?