(session: vscode.DebugSession)
| 108 | |
| 109 | // Call this method after session actually started. It inserts new session into the session tree |
| 110 | public static NewSessionStarted(session: vscode.DebugSession): CDebugSession { |
| 111 | const newSession = CDebugSession.GetSession(session); // May have already in the global list |
| 112 | newSession.status = 'started'; |
| 113 | if (session.parentSession && (session.parentSession.type === 'cortex-debug')) { |
| 114 | const parent = CDebugSession.FindSession(session.parentSession); |
| 115 | if (!parent) { |
| 116 | vscode.window.showErrorMessage( |
| 117 | `Internal Error: Have parent for new session, Parent = ${session.parentSession.name} but can't find it`); |
| 118 | } else { |
| 119 | parent.add(newSession); // Insert into tree |
| 120 | } |
| 121 | } else { |
| 122 | CDebugSession.ROOT.add(newSession); |
| 123 | } |
| 124 | return newSession; |
| 125 | } |
| 126 | |
| 127 | public static getAllUsedPorts(): number[] { |
| 128 | const ports = new Set<number>(); |
no test coverage detected