private void OnEnterBreakMode(EnvDTE.dbgEventReason Reason, ref EnvDTE.dbgExecutionAction ExecutionAction) { int activeProcessId = _serviceProvider.GetDTE().Debugger.CurrentProcess.ProcessID; AD7Engine engine = AD7Engine.GetEngines().SingleOrDefault(target => target.Process != null && target.Process.Id == activeProcessId); if (engine != null) { long?activeThreadId = ((IThreadIdMapper)engine).GetPythonThreadId((uint)_serviceProvider.GetDTE().Debugger.CurrentThread.ID); if (activeThreadId != null) { AttachProcess(engine.Process, engine); ChangeActiveThread(activeThreadId.Value, false); } } }
private async Task OnReadyForInputAsync() { if (IsInDebugBreakMode()) { foreach (var engine in AD7Engine.GetEngines()) { if (engine.Process != null) { if (!_evaluators.ContainsKey(engine.Process.Id)) { await AttachProcessAsync(engine.Process, engine); } } } } }
private void OnReadyForInput() { if (IsInDebugBreakMode()) { foreach (var engine in AD7Engine.GetEngines()) { if (engine.Process != null) { if (!_evaluators.ContainsKey(engine.Process.Id)) { AttachProcess(engine.Process, engine); } } } } }