Exemple #1
0
 protected override ScopesResponse HandleScopesRequest(ScopesArguments arguments)
 {
     return
         (new ScopesResponse(
              _values
              .Select(t => new Scope(t.Name, t.Id, true))
              .ToList()));
 }
        internal ScopesResponse HandleScopesRequest(ScopesArguments arguments)
        {
            if (this._scopes == null)
            {
                this._scopes = this.GetScopes().ToList();
            }

            return(new ScopesResponse(scopes: this._scopes.Select(s => s.GetProtocolObject(new object())).ToList()));
        }
        internal ScopesResponse HandleScopesRequest(ScopesArguments args)
        {
            SampleStackFrame frame = this.GetStackFrame(args.FrameId);

            if (frame == null)
            {
                throw new ProtocolException(Invariant($"Invalid frame id '{args.FrameId}'!"));
            }

            return(frame.HandleScopesRequest(args));
        }
        public Task <ScopesResponse> Handle(ScopesArguments request, CancellationToken cancellationToken)
        {
            VariableScope[] variableScopes =
                _debugService.GetVariableScopes(
                    (int)request.FrameId);

            return(Task.FromResult(new ScopesResponse
            {
                Scopes = new Container <Scope>(variableScopes
                                               .Select(LspDebugUtils.CreateScope))
            }));
        }
Exemple #5
0
 protected override ScopesResponse HandleScopesRequest(ScopesArguments arguments)
 {
     return(new ScopesResponse(new List <Scope>()
     {
         new Scope()
         {
             Name = "Registers",
             NamedVariables = 17,
             VariablesReference = 1
         }
     }));
 }
        public IEnumerable <Scope> GetScopes(ScopesArguments args)
        {
            if ((engine.State & HALT_OR_FAULT) == 0)
            {
                var context   = engine.InvocationStack.Peek(args.FrameId);
                var contextID = AddVariableContainer(
                    new ExecutionContextContainer(this, context, Contract));
                yield return(new Scope("Locals", contextID, false));

                var storageID = AddVariableContainer(engine.GetStorageContainer(this));
                yield return(new Scope("Storage", storageID, false));
            }
        }
 protected override ScopesResponse HandleScopesRequest(ScopesArguments arguments)
 {
     foreach (var t in debugged.Threads)
     {
         var thread = t.Value as VSCodeThread;
         var frame  = thread.FindFrame(arguments.FrameId);
         if (frame != null)
         {
             ScopesResponse res = new ScopesResponse();
             res.Scopes = new List <Scope>()
             {
                 frame.LocalVariables.Scope, frame.Arguments.Scope
             };
             return(res);
         }
     }
     return(new ScopesResponse());
 }
        protected override ScopesResponse HandleScopesRequest(ScopesArguments arguments)
        {
            try
            {
                if (session == null)
                {
                    throw new InvalidOperationException();
                }

                var scopes = session.GetScopes(arguments).ToList();
                return(new ScopesResponse(scopes));
            }
            catch (Exception ex)
            {
                Log(ex.Message, LogCategory.DebugAdapterOutput);
                throw new ProtocolException(ex.Message, ex);
            }
        }
Exemple #9
0
 protected override ScopesResponse HandleScopesRequest(ScopesArguments arguments)
 {
     return(this.ThreadManager.HandleScopesRequest(arguments));
 }