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

Function evaluateAndSendErrors

src/debug/dart_debug_impl.ts:1642–1655  ·  view source on GitHub ↗
(thread: ThreadInfo, expression: string, type: "condition" | "log message")

Source from the content-addressed store, hash-verified

1640 }
1641
1642 private async evaluateAndSendErrors(thread: ThreadInfo, expression: string, type: "condition" | "log message"): Promise<VMInstanceRef | undefined> {
1643 if (!this.vmService)
1644 return;
1645 try {
1646 const result = await this.vmService.evaluateInFrame(thread.ref.id, 0, expression, true);
1647 if (result.result.type !== "@Error") {
1648 return result.result as VMInstanceRef;
1649 } else {
1650 this.logToUser(`Debugger failed to evaluate breakpoint ${type} "${expression}"\n`);
1651 }
1652 } catch {
1653 this.logToUser(`Debugger failed to evaluate breakpoint ${type} "${expression}"\n`);
1654 }
1655 }
1656
1657 public handleServiceExtensionAdded(event: VMEvent) {
1658 if (event && event.extensionRPC) {

Callers

nothing calls this directly

Calls 1

evaluateInFrameMethod · 0.80

Tested by

no test coverage detected