(session: vscode.DebugSession)
| 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; |
nothing calls this directly
no test coverage detected