Vscode: Windows terminal issues caused by winpty

Created on 13 Mar 2018  ยท  21Comments  ยท  Source: microsoft/vscode

This is a meta issue to act as a central place for all winpty issues.

Legend

| Icon | Meaning
|---|---
| โœ”๏ธ | Workaround in place
| โœ–๏ธ | Still an issue

General

Foreground/background color

Process killing / ctrl+c

Clearing

Tasks

Windows regressions

These issues slipped into stable Windows and took month(s) to get a fix to users as a result.

integrated-terminal plan-item windows

Most helpful comment

@ghiscoding this year, I'll be working on this again next month so it will hopefully make it into 1.29.

All 21 comments

Shouldn't #45682 be also added to this list?

@monk-time added it to the list

@Tyriar how did the initial exploration go, if there was time for any? ConPTY sounds _great_ in theory although I'm not sure that my high hopes of replacing winpty entirely are real :)

@borekb it's in progress (https://github.com/Microsoft/node-pty/issues/216), I put it on hold as we're almost testing the August build and it won't make it. It's basically working but I can't stick it in VS Code yet as I'm having build problems when compiling against VS Code's version of node. Hopefully will something we can play around with soon ๐Ÿ˜ƒ

It says there is a workaround to this issue but I don't see it here. I have lost THREE DAYS of work to this and I need the terminal window. How do I get it to run with winpty issues showing up in the Developer Tools Console output?

@programmingj to what issue are you referring to? This issue is linked to from many different bugs which are expected to be fixed once winpty is replaced by conpty https://github.com/Microsoft/node-pty/issues/216

The issue is no matter how many times I uninstall and install VS Code,
the Core SDK, rename every occurrence of winpty.dll to something else, go
back to previous versions of anything that was upgraded during this time
(like OmniSharp), allowing those components and Code to update themselves
or installing newer versions from scratch I can't get an integrated or
external terminal window to come up or build my code because OmniSharp also
points out that it can't find dotnet (CLI) and recommends I install the
Core SDK (which i have done repeatedly with and without uninstalling prior
versions and/or rebooting in between, and at all times I can call dotnet
commands and they work fine from a separate command window) but nothing has
gotten me back up and running with a working terminal window!

Sorry for the frustration in this response but I have been down for a
week because of this issue and the random intellisense issue that ended up
causing me to go through all of these installations in the first place
(originally caused by someone putting a sln file from another project into
a subfolder of this project folder) and now I can't work because a clean
install of Code, even after deleting every folder where anything even
remotely related to Code is stored, etc. doesn't actually get me a clean,
fresh install of Code on my machine!

On Thu, Sep 13, 2018, 10:18 PM Daniel Imms notifications@github.com wrote:

@programmingj https://github.com/programmingj to what issue are you
referring to? This issue is linked to from many different bugs which are
expected to be fixed once winpty is replaced by conpty
Microsoft/node-pty#216 https://github.com/Microsoft/node-pty/issues/216

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/45693#issuecomment-421226121,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALCphRwgAhYJR1NOhBNwhmMlqDT0Gm-9ks5uay4ogaJpZM4SpWDx
.

On Sep 13, 2018 10:18 PM, "Daniel Imms" notifications@github.com wrote:

@programmingj https://github.com/programmingj to what issue are you
referring to? This issue is linked to from many different bugs which are
expected to be fixed once winpty is replaced by conpty
Microsoft/node-pty#216 https://github.com/Microsoft/node-pty/issues/216

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/45693#issuecomment-421226121,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALCphRwgAhYJR1NOhBNwhmMlqDT0Gm-9ks5uay4ogaJpZM4SpWDx
.

@programmingj sounds totally unrelated to #45693 and instead related to your environment. We help investigate if you create a new issue, ideally go through the issue reporter in VS Code (Help menu) so we get OS/vscode version and other details.

@Tyriar

This issue is linked to from many different bugs which are expected to be fixed once winpty is replaced by conpty Microsoft/node-pty#216

Just curious, is this big change planned for the 2018 roadmap or will it be next year? I'd be happy to see a more reliable terminal. Thanks and keep up the great work ๐Ÿ˜ƒ

I am having to have my entire machine re-imaged because I still can't
get a terminal or get Code to see/run the dotnet CLI (I can run dotnet
commands from a CMD window separately from Code), even after uninstalling
ALL Visual Studio 2015 related installs (except for SQL Server MS and the
framework versions) and every version of the SDK then reinstalling the SDK
and Code after deleting the Code folder in %appdata% and the .vscode folder
in my user folder! The only error I get at all anywhere is the pty one...

On Wed, Sep 19, 2018, 8:35 PM Ghislain B. notifications@github.com wrote:

@Tyriar https://github.com/Tyriar

This issue is linked to from many different bugs which are expected to be
fixed once winpty is replaced by conpty Microsoft/node-pty#216
https://github.com/Microsoft/node-pty/issues/216

Just curious, is this big change planned for the 2018 roadmap or will it
be next year? I'd be happy to see a more reliable terminal. Thanks and keep
up the great work ๐Ÿ˜ƒ

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/45693#issuecomment-423020212,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALCphfl4Xjie05mqq6gC7b7eubUR1Bv7ks5ucv7igaJpZM4SpWDx
.

@ghiscoding this year, I'll be working on this again next month so it will hopefully make it into 1.29.

Not sure if this is of any help, but when opening the bash terminal it additionally scrolls all the way down after highlighting the entire terminal. Killing it and opening a new terminal just goes back to the regular highlighting issue. The following image is right after opening a terminal just after opening VSCode
image
This is additionally on a machine that got a fresh installation of windows an hour prior.

@Tyriar It didn't make into 1.29. Are you planning to release the improvements in 1.30?

@ghiscoding this year, I'll be working on this again next month so it will hopefully make it into 1.29.

with latest fall creators update, windows is psesdo console apis. is vscode planning to use them?
Reference: https://docs.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session
@Tyriar
i want to give it a try

@cedric05 This is being done in https://github.com/Microsoft/node-pty/issues/236 (see https://github.com/Microsoft/node-pty/issues/216 for details).

I was redirected here by another user, but the issue at #26375 & #47088 has also happened outside of vscode (In my case, it is the terminal of Ubuntu), so it likely to be some OS bug.

Adoption of conpty is on the way as @ExE-Boss pointed out, it's currently blocked on VS Code adopting Electron 3 https://github.com/Microsoft/vscode/issues/52629

@Tyriar is this shipped in exploration builds if electron 3 is the blocker?

cls still doesn't clear scroll buffer on Windows systems. Rather annoying. Particularly when you need to search through long logs.

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cls
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/functions/clear-host

ConPTY support is landing in the next Insiders build, this uses a new backend for the terminal on WIndows 10 build number 17692+, this is expected to fix many bugs in the terminal on Windows as we're adopting Microsoft's official pty API. For earlier versions winpty will still be used a many bugs will still remain (unless they're fixed in that project).

If you find any issues with conpty please report them to https://github.com/Microsoft/console (the team who own ConPTY) or this repo (if you think it's an integration issue). You can opt out of conpty by adding this setting:

"terminal.integrated.windowsEnableConpty": false

Update: Windows build number 18309+ is now required for ConPTY to be turned on as it was not stable on 17692.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikosEfthias picture NikosEfthias  ยท  3Comments

VitorLuizC picture VitorLuizC  ยท  3Comments

vsccarl picture vsccarl  ยท  3Comments

shanalikhan picture shanalikhan  ยท  3Comments

chrisdias picture chrisdias  ยท  3Comments