How do I keep the engine from crashing while playtesting?

By “debugger” I mean a “debugger.” As in “attach to process” or “launch process” in the Visual Studio IDE or the Visual Studio Code IDE.
If you don’t know how to start a program with debugging in your IDE of choice, I recommend reading up on how to do that, it’s a fundamental part of the programmers toolset.