felonius
asked on
Debugging multiple processes in MS VC++
Hi,
I am finding myself in a position where I need to make applications that consist of multiple processes (*NOT* threads). My program starts in one process and spawns several others along the way. This is all fine, except for the fact that I only seem to be able to debug the first process.
Is it possible in Visual C++ 6 to switch to debugging the other processes? If so, how? Note that they all use the same exe module and setting break points in the code used by the other processes has no effect.
(PS: The reason why I use multiple processes is because they in later phases of my project need to be distributed on a network and they communicate via TCP/IP - anyway this is done via the WMPI from Critical Software)
Thanks in advance,
Jacob Marner
I am finding myself in a position where I need to make applications that consist of multiple processes (*NOT* threads). My program starts in one process and spawns several others along the way. This is all fine, except for the fact that I only seem to be able to debug the first process.
Is it possible in Visual C++ 6 to switch to debugging the other processes? If so, how? Note that they all use the same exe module and setting break points in the code used by the other processes has no effect.
(PS: The reason why I use multiple processes is because they in later phases of my project need to be distributed on a network and they communicate via TCP/IP - anyway this is done via the WMPI from Critical Software)
Thanks in advance,
Jacob Marner
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Not a perfect solution, but acceptable. Thanks.
In case somebody asks this question again, here is what I did:
1. I insert some blocking command where I want the break point ( say, with a getchar() call )
2. execute the program outside the debugger.
3. I attach to the process I want to debug
4. open the source code in the main window,
5. set a break point just after getchar(),
6. hit enter in the application window
I am now debugging the child process with full symbol info.
In case somebody asks this question again, here is what I did:
1. I insert some blocking command where I want the break point ( say, with a getchar() call )
2. execute the program outside the debugger.
3. I attach to the process I want to debug
4. open the source code in the main window,
5. set a break point just after getchar(),
6. hit enter in the application window
I am now debugging the child process with full symbol info.
--EC--