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

Method initAdapter

src/dapDebugServer.ts:181–204  ·  view source on GitHub ↗

@inheritdoc

(adapter: DebugAdapter, target: ITarget)

Source from the content-addressed store, hash-verified

179
180 /** @inheritdoc */
181 public async initAdapter(adapter: DebugAdapter, target: ITarget): Promise<boolean> {
182 const init = this.sessions.get(target.id())?.settledValue;
183 if (!init) {
184 throw new Error(`Expected to find pending init for target ${target.id()}`);
185 }
186
187 if (init.setExceptionBreakpointsParams) {
188 await adapter.setExceptionBreakpoints(init.setExceptionBreakpointsParams);
189 }
190 for (const { params, ids } of init.setBreakpointsParams) {
191 await adapter.breakpointManager.setBreakpoints(params, ids);
192 }
193 await adapter.setCustomBreakpoints({
194 xhr: init.xhrBreakpoints,
195 ids: init.customBreakpoints,
196 });
197 await adapter.onInitialize(init.initializeParams);
198 await adapter.configurationDone();
199
200 await adapter.launchBlocker();
201 init.deferred.resolve({});
202
203 return true;
204 }
205
206 /** @inheritdoc */
207 public releaseDap(target: ITarget): void {

Callers

nothing calls this directly

Calls 9

onInitializeMethod · 0.80
resolveMethod · 0.80
getMethod · 0.65
idMethod · 0.65
setBreakpointsMethod · 0.65
setCustomBreakpointsMethod · 0.65
configurationDoneMethod · 0.65
launchBlockerMethod · 0.45

Tested by

no test coverage detected