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

Method _init

src/test/test.ts:221–252  ·  view source on GitHub ↗
(
    adapter: DebugAdapter,
    _target: ITarget,
    launcher: BrowserLauncher<AnyChromiumLaunchConfiguration>,
  )

Source from the content-addressed store, hash-verified

219 }
220
221 async _init(
222 adapter: DebugAdapter,
223 _target: ITarget,
224 launcher: BrowserLauncher<AnyChromiumLaunchConfiguration>,
225 ) {
226 adapter.breakpointManager.setPredictorDisabledForTest(true);
227 adapter.sourceContainer.setSourceMapTimeouts({
228 load: 0,
229 resolveLocation: 2000,
230 sourceMapMinPause: 1000,
231 output: 3000,
232 sourceMapCumulativePause: 10000,
233 });
234 this._adapter = adapter;
235
236 this._root._browserLauncher = launcher;
237 this._connection = this._root._browserLauncher?.connectionForTest()!;
238 const result = await this._connection.rootSession().Target.attachToBrowserTarget({});
239 const testSession = this._connection.createSession(result!.sessionId);
240 const { sessionId } = (await testSession.Target.attachToTarget({
241 targetId: this._target instanceof BrowserTarget ? this._target.targetId : this._target.id(),
242 flatten: true,
243 }))!;
244 this._cdp = this._connection.createSession(sessionId);
245 await this._session._init();
246 if (this._target.parent()) {
247 this.dap.configurationDone({});
248 this.dap.attach({});
249 }
250
251 return false;
252 }
253
254 async load() {
255 await this.dap.configurationDone({});

Callers

nothing calls this directly

Calls 11

setSourceMapTimeoutsMethod · 0.80
attachToBrowserTargetMethod · 0.80
rootSessionMethod · 0.80
attachToTargetMethod · 0.80
createSessionMethod · 0.65
idMethod · 0.65
_initMethod · 0.65
parentMethod · 0.65
configurationDoneMethod · 0.65
attachMethod · 0.65

Tested by

no test coverage detected