MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / disconnect

Function disconnect

src/notebooks/debugger/kernelDebugAdapterBase.ts:232–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

230 }
231
232 public async disconnect() {
233 if (!this.disconnected) {
234 this.disconnected = true;
235 if (
236 this.debugService.activeDebugSession === this.session ||
237 this.debugService.activeDebugSession?.id === this.session.id
238 ) {
239 try {
240 await Promise.all([
241 this.deleteDumpedFiles().catch((ex) =>
242 logger.warn('Error deleting temporary debug files.', ex)
243 ),
244 this.session.customRequest('disconnect', { restart: false })
245 ]);
246 } catch (e) {
247 logger.error(`Failed to disconnect debug session`, e);
248 }
249 }
250 this.endSession.fire(this.session);
251 }
252 }
253
254 dispose() {
255 this.disposables.forEach((d) => d.dispose());

Callers

nothing calls this directly

Calls 5

customRequestMethod · 0.80
warnMethod · 0.65
errorMethod · 0.65
allMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected