private ScopesMessageResult DoGetScopes(ScopesMessage message) { int frameId = message.FrameId; EnsureIsCurrentFrame(frameId); List<Scope> result = new List<Scope>(); foreach (var name in Scopes.GetNames()) result.Add(State.AddScope(frameId, (id) => new Scope(id, name))); return new ScopesMessageResult(result); }