void AttachToProcessImpl(int procId) { attaching = true; MtaThread.Run(delegate { var iCorDebug = CoreClrShimUtil.CreateICorDebugForProcess(dbgShimInterop, procId, RuntimeLoadTimeout); dbg = new CorDebugger(iCorDebug); process = dbg.DebugActiveProcess(procId, false); SetupProcess(process); process.Continue(false); }); OnStarted(); }
protected override void OnRun(DebuggerStartInfo startInfo) { MtaThread.Run(() => { var workingDir = PrepareWorkingDirectory(startInfo); var env = PrepareEnvironment(startInfo); var cmd = PrepareCommandLine(startInfo); int procId; var iCorDebug = CoreClrShimUtil.CreateICorDebugForCommand( dbgShimInterop, cmd, workingDir, env, RuntimeLoadTimeout, out procId); dbg = new CorDebugger(iCorDebug); process = dbg.DebugActiveProcess(procId, false); processId = process.Id; SetupProcess(process); process.Continue(false); }); OnStarted(); }