/// <summary> /// Disconnect all debuggers except the given one. /// </summary> private void DisposeOtherDebuggers(XDebugger correctDebugger) { XDebugger debugger; while (debuggers.TryTake(out debugger)) { if (debugger != correctDebugger) { debugger.Dispose(); } } }
/// <summary> /// New JDWP process found, attach debugger to it. /// </summary> private void OnDebuggableProcessAdded(IDevice device, int pid) { // Did we see the pid before? lock (processedPidsLock) { if (!processedPids.Add(pid)) { outputPane.LogLine(string.Format("Found debuggable process {0} again, ignoring", pid)); return; } } // Wait a while, it can be a very short lived process Thread.Sleep(500); // Cancelled? if (token.IsCancellationRequested) { DLog.Debug(DContext.VSDebuggerLauncher, "Cancel requested"); return; } // Check if pid still exists var monitor = jdwpMonitor; if ((monitor == null) || !monitor.ContainsProcess(pid)) { DLog.Debug(DContext.VSDebuggerLauncher, "JDWP process gone {0}", pid); return; } // Create and attach debugger outputPane.LogLine(string.Format("Found debuggable process {0}", pid)); var debugger = new XDebugger(ide.GetFrameworkTypeMap(apiLevel)); debuggers.Add(debugger); debugger.JdwpEvent += OnDebuggerDalvikEvent; debugger.Connect(device, pid, new MapFile(), apkPath); ide.CurrentDevice = device; ide.CurrentProcessId = pid; }
internal ReferenceTypeCommandSet(Debugger debugger) : base(debugger, 2) { }
internal StringReferenceCommandSet(Debugger debugger) : base(debugger, 10) { }
internal ClassTypeCommandSet(Debugger debugger) : base(debugger, 3) { }
internal VirtualMachineCommandSet(Debugger debugger) : base(debugger, 1) { }
internal DdmsCommandSet(Debugger debugger) : base(debugger, 0xC7) { }
internal StackFrameCommandSet(Debugger debugger) : base(debugger, 16) { }
internal ClassReferenceCommandSet(Debugger debugger) : base(debugger, 17) { }
internal ObjectReferenceCommandSet(Debugger debugger) : base(debugger, 9) { }
internal EventRequestCommandSet(Debugger debugger) : base(debugger, 15) { }
/// <summary> /// New JDWP process found, attach debugger to it. /// </summary> private void OnDebuggableProcessAdded(IDevice device, int pid) { // Did we see the pid before? lock (processedPidsLock) { if (!processedPids.Add(pid)) { outputPane.LogLine(string.Format("Found debuggable process {0} again, ignoring", pid)); return; } } // Wait a while, it can be a very short lived process Thread.Sleep(500); // Cancelled? if (token.IsCancellationRequested) { DLog.Debug(DContext.VSDebuggerLauncher, "Cancel requested"); return; } // Check if pid still exists var monitor = jdwpMonitor; if ((monitor == null) || !monitor.ContainsProcess(pid)) { DLog.Debug(DContext.VSDebuggerLauncher, "JDWP process gone {0}", pid); return; } // Create and attach debugger outputPane.LogLine(string.Format("Found debuggable process {0}", pid)); var debugger = new XDebugger(ide.GetFrameworkTypeMap(apiLevel)); debuggers.Add(debugger); debugger.JdwpEvent += OnDebuggerDalvikEvent; debugger.Connect(device, pid, new MapFile()); ide.CurrentDevice = device; ide.CurrentProcessId = pid; }
internal ThreadReferenceCommandSet(Debugger debugger) : base(debugger, 11) { }
internal MethodCommandSet(Debugger debugger) : base(debugger, 6) { }
internal ArrayReferenceCommandSet(Debugger debugger) : base(debugger, 13) { }
/// <summary> /// Default ctor /// </summary> public DebugProcess(Dot42.DebuggerLib.Debugger debugger, MapFile mapFile) : base(debugger, mapFile, null) { }