MCPcopy
hub / github.com/microsoft/vscode-js-debug / evaluate

Function evaluate

src/test/node/node-runtime.test.ts:34–45  ·  view source on GitHub ↗
(handle: NodeTestHandle, expression: string)

Source from the content-addressed store, hash-verified

32 }
33
34 async function evaluate(handle: NodeTestHandle, expression: string) {
35 handle.load();
36 const { threadId } = handle.log(await handle.dap.once('stopped'));
37 const stack = await handle.dap.stackTrace({ threadId });
38 await handle.logger.evaluateAndLog(expression, {
39 params: {
40 frameId: stack.stackFrames[0].id,
41 },
42 });
43
44 handle.assertLog();
45 }
46
47 function assertSkipFiles(expectedStacktrace: string) {
48 const stackframes = expectedStacktrace.trim().split('\n');

Callers 1

Calls 6

evaluateAndLogMethod · 0.80
assertLogMethod · 0.80
loadMethod · 0.65
logMethod · 0.65
onceMethod · 0.65
stackTraceMethod · 0.65

Tested by

no test coverage detected