(e: vscode.DebugSessionCustomEvent, decoder: RTTConsoleDecoderOpts)
| 826 | } |
| 827 | |
| 828 | private rttCreateTerninal(e: vscode.DebugSessionCustomEvent, decoder: RTTConsoleDecoderOpts) { |
| 829 | this.createRTTSource(e, decoder.tcpPort, decoder.port).then((src: SocketRTTSource) => { |
| 830 | for (const terminal of this.rttTerminals) { |
| 831 | const success = !terminal.inUse && terminal.tryReuse(decoder, src); |
| 832 | if (success) { |
| 833 | if (vscode.debug.activeDebugConsole) { |
| 834 | vscode.debug.activeDebugConsole.appendLine( |
| 835 | `Reusing RTT terminal for channel ${decoder.port} on tcp port ${decoder.tcpPort}` |
| 836 | ); |
| 837 | } |
| 838 | return; |
| 839 | } |
| 840 | } |
| 841 | const newTerminal = new RTTTerminal(this.context, decoder, src); |
| 842 | this.rttTerminals.push(newTerminal); |
| 843 | if (vscode.debug.activeDebugConsole) { |
| 844 | vscode.debug.activeDebugConsole.appendLine( |
| 845 | `Created RTT terminal for channel ${decoder.port} on tcp port ${decoder.tcpPort}` |
| 846 | ); |
| 847 | } |
| 848 | }); |
| 849 | } |
| 850 | |
| 851 | private terminalClosed(terminal: vscode.Terminal) { |
| 852 | this.rttTerminals = this.rttTerminals.filter((t) => t.terminal !== terminal); |
no test coverage detected