vscode: Local Echo breaks docker exec printout
Issue Type: Bug
- Create a WSL2 setup using Ubuntu 20.04 as the client OS and Docker Desktop 2.5.0 in WSL2 mode. (Unsure if this is required but this is my setup)
- Load your vscode inside your WSL2 guest, then start a terminal session.
- Run a docker image:
docker run --rm -it node:14.15.0-alpine sh
- Try something like
ls /
, you would get this:
- Go to settings.json and turn off local echo:
"terminal.integrated.localEchoLatencyThreshold": -1
- In my case the terminal refreshes immediately and I can now see the correct contents of the terminal:
Note: I tried with docker run --rm -it alpine sh
and could not reproduce this bug, but the fact that local echo seems to be a proximate cause seems worth investigating.
VS Code version: Code 1.51.0 (fcac248b077b55bae4ba5bab613fd6e9156c2f0c, 2020-11-05T18:18:23.642Z) OS version: Windows_NT x64 10.0.19042 Remote OS version: Linux x64 4.19.104-microsoft-standard
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-10710U CPU @ 1.10GHz (12 x 1608) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.76GB (4.62GB free) |
Process Argv | –crash-reporter-id 6a21a6e0-2ac5-446e-88c1-ad7f0b95572d |
Screen Reader | no |
VM | 0% |
Item | Value |
---|---|
Remote | WSL: Ubuntu |
OS | Linux x64 4.19.104-microsoft-standard |
CPUs | Intel® Core™ i7-10710U CPU @ 1.10GHz (12 x 1608) |
Memory (System) | 3.84GB (1.42GB free) |
VM | 0% |
Extensions (25)
Extension | Author (truncated) | Version |
---|---|---|
vscode-docker | ms- | 1.7.0 |
remote-containers | ms- | 0.148.0 |
remote-wsl | ms- | 0.51.1 |
debugger-for-edge | msj | 1.0.15 |
sql-bigquery | shi | 1.4.0 |
vim | vsc | 1.17.1 |
vscode-npm-script | eg2 | 0.3.13 |
go | gol | 0.18.1 |
terraform | has | 2.2.3 |
vscode-docker | ms- | 1.7.0 |
python | ms- | 2020.10.332292344 |
vscode-typescript-tslint-plugin | ms- | 1.2.3 |
vsliveshare | ms- | 1.0.3121 |
vetur | oct | 0.29.1 |
java | red | 0.70.0 |
vscode-xml | red | 0.13.0 |
vscode-yaml | red | 0.12.0 |
trailing-spaces | sha | 0.3.1 |
vscode-scss-formatter | sib | 2.0.2 |
vscodeintellicode | Vis | 1.2.10 |
vscode-java-debug | vsc | 0.29.0 |
vscode-java-dependency | vsc | 0.14.0 |
vscode-java-pack | vsc | 0.10.0 |
vscode-java-test | vsc | 0.26.0 |
vscode-maven | vsc | 0.25.0 |
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 20 (8 by maintainers)
I’m seeing this on Mac (Catalina, 10.15.7) as well.
I’m shelled into a kubernetes container on AKS, and when I issue commands like “ls”, I see one of three things:
Resizing the VSCode window (and hence the terminal) causes the missing text to appear. I just started noticing it today; it’s possible that the reason I just noticed it today was because I restarted VSCode for the first time in a week or two.
Version: 1.51.0 Commit: fcac248b077b55bae4ba5bab613fd6e9156c2f0c Date: 2020-11-05T18:14:40.758Z (4 days ago) Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 19.6.0
Log running the command in wsl2/ubuntu where the problem happens:
Log running it through powershell:
Seems roughly equivalent, just broken up into different chunks and with slightly different data attributes. Also, in the former case, the write is wrapped with a hide/show cursor sequence since predictions are participating in the output.
OK, I tried to screencap what I’m seeing and it’s truly weird. I wanted to show the contents of the terminal returning when I disabled local echo, but instead I found that as soon as I opened settings.json in a pane, they came back right away!
My guess is that the bug will happen or not base on whether local echo triggers, so based on the threshold it may happen some times and not others. No clue as to why opening settings.json (without changing the setting) fixes things though.
Video