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

Method sendResponse

src/test/dart_debug_client.ts:121–137  ·  view source on GitHub ↗
(request: DebugProtocol.Request, body: any)

Source from the content-addressed store, hash-verified

119 }
120
121 private sendResponse(request: DebugProtocol.Request, body: any): void {
122 // Hack: Underlying class doesn't have response support.
123 const me = (this as unknown as { outputStream: Writable, sequence: number });
124
125 const response: DebugProtocol.Response = {
126 body,
127 command: request.command,
128 // eslint-disable-next-line camelcase
129 request_seq: request.seq,
130 seq: me.sequence++,
131 success: true,
132 type: "response",
133 };
134
135 const json = JSON.stringify(response);
136 me.outputStream.write(`Content-Length: ${Buffer.byteLength(json, "utf8")}\r\n\r\n${json}`, "utf8");
137 }
138
139 private handleCustomEvent(e: DebugSessionCustomEvent) {
140 this.debugCommands.handleDebugSessionCustomEvent({

Callers 15

constructorMethod · 0.95
initializeRequestFunction · 0.80
launchRequestFunction · 0.80
setBreakPointsRequestFunction · 0.80
configurationDoneRequestFunction · 0.80
pauseRequestFunction · 0.80
sourceRequestFunction · 0.80
threadsRequestFunction · 0.80
stackTraceRequestFunction · 0.80
scopesRequestFunction · 0.80
variablesRequestFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected