Hi,
I'm trying to create an extension that will need to launch a debugger for a certain program, the debugger and program start up with the following code:
var targetInfo =
new VsDebugTargetInfo
{
bstrExe = @"C:\Program\Program.exe",
dlo = DEBUG_LAUNCH_OPERATION.DLO_CreateProcess,
bstrRemoteMachine = "192.168.246.1:4022",
bstrArg = "",
bstrCurDir = "C:\\Program\\",
bstrMdmRegisteredName = null,
bstrEnv = "",
bstrOptions = null,
bstrPortName = null,
//grfLaunch = (uint)__VSDBGLAUNCHFLAGS.DBGLAUNCH_Silent,
//clsidCustom = VSConstants.DebugEnginesGuids.COMPlusNewArchEngine_guid,
clsidCustom = VSConstants.DebugEnginesGuids.ManagedAndNative_guid,
};
targetInfo.cbSize = (uint)Marshal.SizeOf(targetInfo);
VsShellUtilities.LaunchDebugger(
this.package,
targetInfo
);But the program behaves differently than when I launch it with the debugger manually, although the arguments I can fill in there are the same as specified here. The program doesn't seem to be able to connect to a port when launching it with the code above.
My question is how do I figure out how VS would start the debugger for the project, to have the same behaviour in both?
Thanks in advance!