/// <summary> /// Detach current process from debugger /// change signaled on attachedCompletedProcessEvent /// </summary> private void Detach() { try { try { debuggeeProcess.Stop(int.MaxValue); } catch (COMException ex) { Debug.WriteLine(ex.ToString()); } debuggeeProcess.Detach(); isAttached = false; attachedCompletedProcessEvent.Reset(); //not attached anymore } catch (COMException ex) { Debug.WriteLine(ex.ToString()); } }
protected override void OnDetach( ) { process.Detach(); }