I'm debugging a networking project, which involves interacting of 3 programs, ie a server, two different clients. However I find it difficult to start and stop them for debugging. Some methods I have tried so far:
Start 3 terminals. Run
./client2. The problem with this method is I need to switch back and forth between windows.
Start 1 terminal. Put these in a script:
./server &;./client1 &;./client2 &. Run the script. The problem with this method is killing the processes after debugging is hard. Need to look up PID and type
Is there a better way to do this? How do people usually debug in that situation?