Custom Debug Engine does not call ResumeProcess after LaunchSuspended
-
Wednesday, July 07, 2010 3:23 AM
I have a custom debug engine that is being successfully launched via LaunchDebugTargets. LaunchSuspended is executed in which I create an instance of IDebugProcess2. GetPhysicalProcessId and GetProcessId are both called and then the execution of the debug engine seems to terminate. I have also tried to grab a real IDebugProcess2 from the IDebugPort2 available to me in LaunchSuspended. No luck here.
Why is ResumeProcess not being called? Am I missing something?
In the Debug Engine Sample I see where the debug engine is grabbing the process ID and getting a IDebugProcess2 from the port and returning it from LaunchSuspended. This seems to work fine for the this engine.
Any ideas?
public int LaunchSuspended(string pszServer, IDebugPort2 pPort, string pszExe, string pszArgs, string pszDir,
string bstrEnv, string pszOptions, enum_LAUNCH_FLAGS dwLaunchFlags, uint hStdInput,
uint hStdOutput, uint hStdError, IDebugEventCallback2 pCallback,
out IDebugProcess2 ppProcess)
{
ppProcess = new MyDebugProcess(pPort);
return VSConstants.S_OK;
}
Answers
-
Saturday, July 24, 2010 1:05 AMModerator
Hi Adam,
I looked through the SDM and I see where we call LaunchSuspended, then GetPhysicalProcessId. But I don't see a susquent call to GetProcessId, so I'm uncertain this is the proper code path. (unless your GetPhysicalProcessId implementation invoked GetProcessId).
But in looking through the code I can see that if the GetPhysicalProcessId fails, we drop out of the the SDM's Launch method, and essentially skip over the ResumeProcess call. Can you verify that the GetPhysicalProcessId is returning an S_OK value?
Barring that, you might want to open an actual support incident with CSS (and have them direct it to the Visual Studio Extensibility support team). We may be able to diagnose the problem by analyzing a dump file.
Thanks,
Ed...
Ed Dore- Proposed As Answer by Ed DoreMicrosoft Employee, Moderator Saturday, July 24, 2010 1:05 AM
- Marked As Answer by Adam Driscoll Wednesday, August 04, 2010 2:33 AM
All Replies
-
Monday, July 19, 2010 9:08 PMModerator
Hi Adam,
It's going to be pretty difficult guessing what the root issue is here. You don't by chance have a repro, you can pass along that I can debug through do you? Also, the debugger package varies a bit from release to release, so it would be good to know which version of VS your DE is targeting here.
Finally, you might want to post some additional details such as the settings passed to LaunchDebugTargets, whether or not you're attempting to launch mulitple targets, what the VsDebugTargetInfo fields are set to, etc.
Thanks,
Ed Dore -
Saturday, July 24, 2010 1:05 AMModerator
Hi Adam,
I looked through the SDM and I see where we call LaunchSuspended, then GetPhysicalProcessId. But I don't see a susquent call to GetProcessId, so I'm uncertain this is the proper code path. (unless your GetPhysicalProcessId implementation invoked GetProcessId).
But in looking through the code I can see that if the GetPhysicalProcessId fails, we drop out of the the SDM's Launch method, and essentially skip over the ResumeProcess call. Can you verify that the GetPhysicalProcessId is returning an S_OK value?
Barring that, you might want to open an actual support incident with CSS (and have them direct it to the Visual Studio Extensibility support team). We may be able to diagnose the problem by analyzing a dump file.
Thanks,
Ed...
Ed Dore- Proposed As Answer by Ed DoreMicrosoft Employee, Moderator Saturday, July 24, 2010 1:05 AM
- Marked As Answer by Adam Driscoll Wednesday, August 04, 2010 2:33 AM
-
Wednesday, August 04, 2010 2:33 AM
It turned out that I wasn't implementing all the proper memebers on the interface. I have the engine up and running http:\\powerguivsx.codeplex.com
Thanks for the help!

