(session: vscode.DebugSession)
| 400 | |
| 401 | // Debug Events |
| 402 | private debugSessionStarted(session: vscode.DebugSession) { |
| 403 | if (session.type !== 'cortex-debug') { return; } |
| 404 | |
| 405 | const newSession = CDebugSession.NewSessionStarted(session); |
| 406 | |
| 407 | this.functionSymbols = null; |
| 408 | session.customRequest('get-arguments').then((args) => { |
| 409 | newSession.config = args; |
| 410 | let svdfile = args.svdFile; |
| 411 | if (!svdfile) { |
| 412 | svdfile = this.getSVDFile(args.device); |
| 413 | } |
| 414 | |
| 415 | Reporting.beginSession(session.id, args as ConfigurationArguments); |
| 416 | |
| 417 | if (newSession.swoSource) { |
| 418 | this.initializeSWO(session, args); |
| 419 | } |
| 420 | if (Object.keys(newSession.rttPortMap).length > 0) { |
| 421 | this.initializeRTT(session, args); |
| 422 | } |
| 423 | this.cleanupRTTTerminals(); |
| 424 | }, (error) => { |
| 425 | vscode.window.showErrorMessage( |
| 426 | `Internal Error: Could not get startup arguments. Many debug functions can fail. Please report this problem. Error: ${error}`); |
| 427 | }); |
| 428 | } |
| 429 | |
| 430 | private debugSessionTerminated(session: vscode.DebugSession) { |
| 431 | if (session.type !== 'cortex-debug') { return; } |
no test coverage detected