Esempio n. 1
0
        public Task <ExecutionResult> ExecuteCodeAsync(string text)
        {
            var res = _commands.TryExecuteCommand();

            if (res != null)
            {
                return(res);
            }

            if (!IsInDebugBreakMode())
            {
                NoExecutionIfNotStoppedInDebuggerError();
                return(ExecutionResult.Succeeded);
            }

            if (_activeEvaluator != null)
            {
                return(_activeEvaluator.ExecuteCodeAsync(text));
            }
            else
            {
                if (CustomDebugAdapterProtocolExtension.CanUseExperimental())
                {
                    var tid    = _serviceProvider.GetDTE().Debugger.CurrentThread.ID;
                    var result = CustomDebugAdapterProtocolExtension.EvaluateReplRequest(text, tid);
                    CurrentWindow.Write(result);
                }
            }

            return(ExecutionResult.Succeeded);
        }
        public Task <ExecutionResult> ExecuteCodeAsync(string text)
        {
            var res = _commands.TryExecuteCommand();

            if (res != null)
            {
                return(res);
            }

            if (!IsInDebugBreakMode())
            {
                NoExecutionIfNotStoppedInDebuggerError();
                return(ExecutionResult.Succeeded);
            }

            if (_activeEvaluator != null)
            {
                return(_activeEvaluator.ExecuteCodeAsync(text));
            }
            return(ExecutionResult.Succeeded);
        }