You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The index will be a string('distinct') rather than a number, while getting element of a list(rttTerminals) requires a number. This causes an exception raised.
I'm not familiar with TS but I've tested the following patch:
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);
Then the RTT terminal comes up.
The text was updated successfully, but these errors were encountered:
@hyx0329 This is a good catch, and reading about it a bit more about TS handling lists, it kinda makes sense. I personally think Typescript should be less 'subtle' about this.
Do you want to PR a fix, or would you prefer one of us to just apply your patch?
Extension version: 0.23.0
VSCode version:
No RTT terminal is opened even when RTT is configured correctly.
It seems there's a mistake in
createRttTerminal
:vscode/src/extension.ts
Lines 200 to 205 in 23f7b8a
The
index
will be a string('distinct') rather than a number, while getting element of a list(rttTerminals
) requires a number. This causes an exception raised.I'm not familiar with TS but I've tested the following patch:
Then the RTT terminal comes up.
The text was updated successfully, but these errors were encountered: