Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using node.exe in the VS Code terminal, a bug is encountered. #230794

Closed
lanrengm opened this issue Oct 8, 2024 · 5 comments
Closed

When using node.exe in the VS Code terminal, a bug is encountered. #230794

lanrengm opened this issue Oct 8, 2024 · 5 comments
Assignees
Labels
terminal-conpty Integrated terminal issues related to the ConPTY backend terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues

Comments

@lanrengm
Copy link

lanrengm commented Oct 8, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
    版本: 1.94.0 (system setup)
    提交: d78a74b
    日期: 2024-10-02T13:08:12.626Z
    Electron: 30.5.1
    ElectronBuildId: 10262041
    Chromium: 124.0.6367.243
    Node.js: 20.16.0
    V8: 12.4.254.20-electron.0
    OS: Windows_NT x64 10.0.19045
  • OS Version: Windows 10 22H2
  • CPU: Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz 2.90 GHz

Steps to Reproduce:

  1. Copy this code:
    image-20241008183114198
m = new Map([
	[1,2],
	[3,4]
]);
iter = m.entries();
  1. Run node in the VSCode terminal (using cmd.exe), right-click the mouse, and paste the code in the terminal:

node version: v20.15.0

image-20241008175839647

It's only happening in VS Code terminal; the system Command Prompt terminal is normal.

The bug does not occur when pasting this code:

m = new Map([[1,2],[3,4]]);
iter = m.entries();
@meganrogge
Copy link
Contributor

can you describe the bug in words?

@meganrogge
Copy link
Contributor

IE expectation vs actual

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Oct 14, 2024
@lanrengm
Copy link
Author

can you describe the bug in words?

When there are multiple lines of arrays in the code, pasting the code will cause the brackets at the end of the statement in the next line of the array to appear incorrectly in the previous line, causing the code to run incorrectly.

When pasting quickly and continuously, the probability of bugs appearing is very high.

@lanrengm
Copy link
Author

m = new Map([
	[1,2],
	[3,4]
]);
iter = m.entries();

I tried it again just now, copying the code above, right-clicking and pasting it into the VSCode Command Prompt, and the error immediately appeared.

The brackets of the second statement appeared before the output of the first statement.

VSCode CMD:

Image

VSCode PowerShell:

Image

Apparently it's not cmd , ps and node 's fault, because no matter how many times I try, they are all normal in the OS:

System CMD:

Image

System PowerShell

Image

@meganrogge meganrogge assigned Tyriar and unassigned meganrogge Oct 21, 2024
@meganrogge meganrogge added terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. and removed info-needed Issue requires more information from poster labels Oct 21, 2024
@Tyriar
Copy link
Member

Tyriar commented Dec 11, 2024

This issue seems to originate from an upstream component and is not something VSCode can fix by making a change to our code. As such, I will go ahead and close it. Please try to reproduce in Windows Terminal and report to microsoft/terminal with repro steps.

If you cannot reproduce in Windows Terminal, chances are it's fixed in a later version of Windows. You can read more about how we consume conpty here. Additionally, soon we plan on shipping conpty v2 with VS Code which should bring our behavior in line with Windows Terminal. Thanks for understanding.

/label upstream terminal-conpty windows

@Tyriar Tyriar closed this as completed Dec 11, 2024
@vs-code-engineering vs-code-engineering bot added upstream Issue identified as 'upstream' component related (exists outside of VS Code) terminal-conpty Integrated terminal issues related to the ConPTY backend windows VS Code on Windows issues labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal-conpty Integrated terminal issues related to the ConPTY backend terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants