Beispiel #1
0
        internal async Task DetachProcessAsync(PythonProcess process)
        {
            _serviceProvider.GetUIThread().MustBeCalledFromUIThread();

            int id = process.Id;
            PythonDebugProcessReplEvaluator evaluator;

            if (_evaluators.TryGetValue(id, out evaluator))
            {
                evaluator.AvailableScopesChanged      -= new EventHandler <EventArgs>(evaluator_AvailableScopesChanged);
                evaluator.MultipleScopeSupportChanged -= new EventHandler <EventArgs>(evaluator_MultipleScopeSupportChanged);
                await process.DisconnectReplAsync();

                _evaluators.Remove(id);
                if (_activeEvaluator == evaluator)
                {
                    _activeEvaluator = null;
                }

                ActiveProcessChanged();
            }
        }