Ejemplo n.º 1
0
        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);
                }
            }
        }
Ejemplo n.º 2
0
 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);
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 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);
                 }
             }
         }
     }
 }