MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / evaluateForFrame

Method evaluateForFrame

src/test/dart_debug_client.ts:277–288  ·  view source on GitHub ↗
(expression: string, context?: string)

Source from the content-addressed store, hash-verified

275 }
276
277 public async evaluateForFrame(expression: string, context?: string): Promise<{
278 result: string;
279 type?: string;
280 variablesReference: number;
281 namedVariables?: number;
282 indexedVariables?: number;
283 }> {
284 const thread = await this.getMainThread();
285 const stack = await this.stackTraceRequest({ threadId: thread.id });
286 const result = await this.evaluateRequest({ expression, frameId: stack.body.stackFrames[0].id, context });
287 return result.body;
288 }
289
290 public assertOutputContains(category: string | undefined, text: string): Promise<DebugProtocol.OutputEvent> {
291 let output = "";

Calls 3

getMainThreadMethod · 0.95
stackTraceRequestMethod · 0.80
evaluateRequestMethod · 0.80

Tested by

no test coverage detected