Click to See Complete Forum and Search --> : Debugging more than one process


Alon Marx
March 30th, 1999, 07:56 AM
Hi all,

I am having a problem running Visual C++ 6.0, when debugging more than one process.

From within the visual studio, I am running an application that creates another process (the parameters are found in

the attached code). My problem is that I am unable to debug the newly created process.

From what I understand the debugger is capable of debugging more than one process, but I haven't found what the problem

is.

Any one knows how to solve this problem?

Thanks,

Alon

email: alonm@email.com

/////////////////////////

// Create session process

STARTUPINFO StartupInfo;

StartupInfo.cb = sizeof(STARTUPINFO);

StartupInfo.lpReserved = NULL;

StartupInfo.lpDesktop = NULL;

StartupInfo.lpTitle = NULL;

StartupInfo.dwX = CW_USEDEFAULT;

StartupInfo.dwY = CW_USEDEFAULT;

StartupInfo.dwXSize = CW_USEDEFAULT;

StartupInfo.dwYSize = CW_USEDEFAULT;

StartupInfo.dwXCountChars = 0;

StartupInfo.dwYCountChars = 0;

StartupInfo.dwFillAttribute = 0;

StartupInfo.dwFlags = STARTF_FORCEOFFFEEDBACK;

StartupInfo.wShowWindow = SW_SHOWDEFAULT;

StartupInfo.cbReserved2 = 0;

StartupInfo.lpReserved2 = NULL;

StartupInfo.hStdInput = 0;

StartupInfo.hStdOutput = 0;

StartupInfo.hStdError = 0;

PROCESS_INFORMATION ProcessInfo;

BOOL fProcessCreated = CreateProcess(

"C:\\Test\\MyProc.exe", // name of executable module

NULL, // command line string - session ID

NULL, // process security attributes

NULL, // thread security attributes

FALSE, // handle inheritance flag

0, // creation flags

NULL, // pointer to new environment block

NULL, // pointer to current directory name

&StartupInfo, // pointer to STARTUPINFO

&ProcessInfo); // pointer to PROCESS_INFORMATION

Once and Future Consultant
March 30th, 1999, 09:49 AM
Start a second instance of the VC environment. In that second instance, open the project

that contains the second executable. In the debug settings, set that project to be called

by the calling project.