A core feature of Visual Studio that allows developers to inspect, analyze, and troubleshoot code during execution.
I'll try to explain it another way. When I open the game in VS it compiles just fine. When I open the game via the executable created by VS the game works fine. The problem is this: When I'm playing the game I can enter a command like "cast 'acid blast' goblin" or "cast 'detect invis'". If I have the code open in VS I need a way to enter commands like that in the debugger so I can see the order of operations in which the code executes that command. In other words, I need to be able to open a working version of the game from VS. I've seen this done before where you have a DOS (or command line) interface on one screen and the game running in VS on another. I can put a break point at the first function called when a command is entered at the command line. Then I can go step-by-step in the debugger and see how the command is actually executed from the moment the command is entered at the command line to the output displayed on the command line once the command has successfully completed.
This game was written over 10 years ago and this is how the games creator describes the execution of a spell:
"Lets assume a player is already connected, and logged in and has the spell etc.
The player types "cast 'acid blast' target", game_loop() recognizes that there is input waiting from the player connection, it redirects the input to interpret() which finds there is a cast command... it then executes the function for this command - do_cast(). do_cast() redirects to do_newcast() which searchs skill_table[] for a spell called "acid blast", after finding it and confirming it has a spell function set, it then executes the spell function (Which is called spell_acid_blast() in this case), and that function does what it is supposed to do."
So let's say I've compile the code and it creates an executable called "reignofshadow.exe". I open a command prompt in Windows 10 and run the executable.
Once this executable runs, the game remains open in the same command prompt window "in the background"
I open a mud client that allows me to connect to the game
https://d.pr/i/4QstsT
https://d.pr/i/CInD3j
Once I'm playing the game I can enter commands like "cast 'acid blast' goblin"
This is where the problem comes in. Once I'm playing the game it's completely disconnected from the code I have open in VS. There's no way for the code in VS to know I've entered a command in my mud client and thus no way for me debug that command. I need a way to start the game from VS that I can play from a command prompt (not using a mud client at all) so I can enter commands and then step through the code in the debugger. So using the image above as reference, I want to be able to enter the command "cast 'acid blast' goblin" at the command prompt, jump back to VS and watch the code execute, line by line, from game_loop(), to interpret(), to do_cast(), to do_newcast(), to skill_table[], to spell_acid_blast() until the game outputs the "You are fighting to kill in this fight." back to the command prompt.
I hope this more clearly explains what I'm needing.