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

Method callMethod

src/debug/dart_debug_protocol.ts:474–490  ·  view source on GitHub ↗
(method: string, params?: any)

Source from the content-addressed store, hash-verified

472 public nextId = 0;
473
474 public callMethod(method: string, params?: any): Promise<DebuggerResult> {
475 const id = `${this.nextId++}`;
476 const completer = new PromiseCompleter<DebuggerResult>();
477 this.completers[id] = completer;
478
479 const json = {
480 id,
481 jsonrpc: "2.0",
482 method,
483 params: params || {},
484 };
485 const str = JSON.stringify(json);
486 this.logTraffic(`==> ${str}\n`);
487 this.socket.send(str);
488
489 return completer.promise;
490 }
491
492 public handleData(data: string) {
493 this.logTraffic(`<== ${data}\n`);

Callers 15

getVersionMethod · 0.95
getVMMethod · 0.95
getIsolateMethod · 0.95
streamListenMethod · 0.95
setExceptionPauseModeMethod · 0.95
setIsolatePauseModeMethod · 0.95
removeBreakpointMethod · 0.95
pauseMethod · 0.95
resumeMethod · 0.95
getStackMethod · 0.95
getObjectMethod · 0.95

Calls 2

logTrafficMethod · 0.95
sendMethod · 0.45

Tested by

no test coverage detected