/// <summary> /// Detach from previously attached process. /// </summary> public void DetachDebugger(int processId) { EnvDTE.Process process = m_attachedProcesses[processId]; try { process.Detach(false); // waitForBreakOnEnd = false. } finally { // If there's some problem, do not try removing next time. m_attachedProcesses.Remove(processId); } }
public void Detach() { if (IsAttached) { try { _attachedProcess.Detach(); } catch { _attachedProcess = null; } } }