MCPcopy Index your code
hub / github.com/WebFreak001/code-debug / scopesRequest

Method scopesRequest

src/mibase.ts:390–415  ·  view source on GitHub ↗
(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments)

Source from the content-addressed store, hash-verified

388 }
389
390 protected scopesRequest(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments): void {
391 const scopes = new Array<Scope>();
392 const [threadId, level] = this.frameIdToThreadAndLevel(args.frameId);
393
394 const createScope = (scopeName: string, expensive: boolean): Scope => {
395 const key: string = scopeName + ":" + threadId + ":" + level;
396 let handle: number;
397
398 if (this.scopeHandlesReverse.hasOwnProperty(key)) {
399 handle = this.scopeHandlesReverse[key];
400 } else {
401 handle = this.variableHandles.create(new VariableScope(scopeName, threadId, level));
402 this.scopeHandlesReverse[key] = handle;
403 }
404
405 return new Scope(scopeName, handle, expensive);
406 };
407
408 scopes.push(createScope("Locals", false));
409 scopes.push(createScope("Registers", false));
410
411 response.body = {
412 scopes: scopes
413 };
414 this.sendResponse(response);
415 }
416
417 protected async variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): Promise<void> {
418 const variables: DebugProtocol.Variable[] = [];

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected