diff --git a/src/extension.ts b/src/extension.ts index ca793ef..0ea8c78 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -197,7 +197,7 @@ class ProbeRSDebugAdapterServerDescriptorFactory implements vscode.DebugAdapterD name: channelName, pty: channelPty, }; - for (let index in this.rttTerminals) { + for (let index = 0; index < this.rttTerminals.length; index++) { var [formerChannelNumber, , ,] = this.rttTerminals[index]; if (formerChannelNumber === channelNumber) { this.rttTerminals.splice(+index, 1);