MCPcopy Index your code
hub / github.com/Marus/cortex-debug / debugSessionTerminated

Method debugSessionTerminated

src/frontend/extension.ts:430–459  ·  view source on GitHub ↗
(session: vscode.DebugSession)

Source from the content-addressed store, hash-verified

428 }
429
430 private debugSessionTerminated(session: vscode.DebugSession) {
431 if (session.type !== 'cortex-debug') { return; }
432 const mySession = CDebugSession.FindSession(session);
433 try {
434 Reporting.endSession(session.id);
435
436 this.liveWatchProvider?.debugSessionTerminated(session);
437 if (mySession?.swo) {
438 mySession.swo.debugSessionTerminated();
439 }
440 if (mySession?.swoSource) {
441 mySession.swoSource.dispose();
442 }
443 if (mySession?.rtt) {
444 mySession.rtt.debugSessionTerminated();
445 }
446 if (mySession?.rttPortMap) {
447 for (const ch of Object.keys(mySession.rttPortMap)) {
448 mySession.rttPortMap[ch].dispose();
449 }
450 mySession.rttPortMap = {};
451 }
452 }
453 catch (e) {
454 vscode.window.showInformationMessage(`Debug session did not terminate cleanly ${e}\n${e ? e.stackstrace : ''}. Please report this problem`);
455 }
456 finally {
457 CDebugSession.RemoveSession(session);
458 }
459 }
460
461 private receivedCustomEvent(e: vscode.DebugSessionCustomEvent) {
462 const session = e.session;

Callers

nothing calls this directly

Calls 3

FindSessionMethod · 0.80
RemoveSessionMethod · 0.80
disposeMethod · 0.65

Tested by

no test coverage detected