Mono.Debugger.Debugger.Detach C# (CSharp) Method

Detach() public method

public Detach ( ) : void
return void
        public void Detach()
        {
            if (main_process == null)
                throw new TargetException (TargetError.NoTarget);
            else if (!main_process.CanDetach)
                throw new TargetException (TargetError.CannotDetach);

            Process[] procs;
            lock (process_hash.SyncRoot) {
                procs = new Process [process_hash.Count];
                process_hash.Values.CopyTo (procs, 0);
            }

            foreach (Process proc in procs) {
                proc.Detach ();
            }
        }

Usage Example

示例#1
0
 public void Detach()
 {
     CancelRuntimeInvokes();
     try {
         debugger.Detach();
     } catch (Exception ex) {
         Console.WriteLine(ex);
     } finally {
         running = false;
     }
 }