internal CorDebugProcess GetDeviceProcess() { DebugPort port = GetDebugPort(); Debug.Assert(!port.IsLocalPort); return(port.GetDeviceProcess(this.DeployDeviceName)); }
internal void EnsureDeviceProcess() { DebugPort port = GetDebugPort(); if (!port.IsLocalPort) { CorDebugProcess process = port.GetDeviceProcess(this.DeployDeviceName); } }
public static CorDebugProcess CreateProcess (DebugPort pPort, string lpCommandLine) { CommandLineBuilder cb = new CommandLineBuilder (lpCommandLine); string[] args = cb.Arguments; string deployDeviceName = args [args.Length - 1]; //Extract deployDeviceName if (!deployDeviceName.StartsWith (CorDebugProcess.c_DeployDeviceName)) throw new Exception (String.Format ("\"{0}\" does not appear to be a valid Micro Framework device name", deployDeviceName)); deployDeviceName = deployDeviceName.Substring (CorDebugProcess.c_DeployDeviceName.Length); cb.RemoveArguments (args.Length - 1, 1); lpCommandLine = cb.ToString (); //CorDebugProcess process = port.GetDeviceProcess(deployDeviceName, 60); CorDebugProcess process = pPort.GetDeviceProcess (deployDeviceName, 60); if (process == null) throw new Exception ("CorDebugProcess.CreateProcessEx() could not create or find the device process"); process.StoreAssemblyPaths (args); bool fDidDeploy = true; //What if we did a launch but no deploy to a device... if (!fDidDeploy) { process.Engine.RebootDevice (Engine.RebootOption.RebootClrWaitForDebugger); } return process; }