I'm writing a game editor and a game within C#. There are two applications: the game editor is a Winforms/SFML hybrid, and the game itself is a Windows application just running a simple game loop in SFML with a pretty standard Program.cs.
From within the editor, I'd like to be able to launch the game executable to playtest the changes. Preferably the effect would be similar to having started both applications from within Visual Studio via the usual multiple startup projects method.
Now, I'm guessing there are a few options here:
- Launch Program.cs in some sort of a background thread. I don't want to do this because I'd prefer process isolation.
- Launch the executable via a path with Process.Start(). I'm not sure if this gives the same level of debugging support as usual. I've not played with the debug mode call on Process enough to know if this is what I'm looking for or not.
- Some other simple method I'm just not aware of?
What's the standard procedure to do this sort of thing?
Edit: I have been requested to explain how this is not a duplicate of Attach debugger in C# to another process I saw this question previously and still posted because that one focused on generically debugging any application. I have something much more specialized here because I control both apps directly; additionally the approach chosen here does not rely on interop as some of the answers there did.