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

Method createSession

src/flatSessionLauncher.ts:94–108  ·  view source on GitHub ↗
(sessionId: string | undefined, name: string, config: IPseudoAttachConfiguration)

Source from the content-addressed store, hash-verified

92 }
93
94 createSession(sessionId: string | undefined, name: string, config: IPseudoAttachConfiguration) {
95 const deferredConnection = getDeferred<DapConnection>();
96 const vsSession = new VSDebugSession(
97 sessionId || 'root',
98 name,
99 deferredConnection.promise,
100 config,
101 );
102 const transport = new SessionIdDapTransport(sessionId, this.rootTransport);
103 const newSession = config.__pendingTargetId
104 ? this.sessionManager.createNewChildSession(vsSession, config.__pendingTargetId, transport)
105 : this.sessionManager.createNewRootSession(vsSession, transport);
106 deferredConnection.resolve(newSession.connection);
107 return newSession;
108 }
109}
110
111const debugServerPort = process.argv.length >= 3 ? +process.argv[2] : undefined;

Callers 2

constructorMethod · 0.95

Calls 4

getDeferredFunction · 0.90
createNewChildSessionMethod · 0.80
createNewRootSessionMethod · 0.80
resolveMethod · 0.80

Tested by

no test coverage detected