-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Terminal is always launching externally when ConPTY is turned on #73790
Comments
Are you on Windows 10 Update 1903? I have the same problem on this build. |
Same issue here. I'm on 1903 as well. vscode 1.34.0 |
Can you share your settings.json file? |
@GollyJer can you try with the Insiders build tomorrow? I made some changes just today around this area. https://code.visualstudio.com/insiders |
@Tyriar Sure... I'll keep you posted. Thanks! 👍 |
Weird, I don't suppose you have anything in your keybindings.json either? Does disabling the Windows Enable Conpty setting affect it? Also what is the comspec environment variable set to? |
Yes, disabling Windows Enable Conpty works, the terminal launches in VS Code. Even in the stable build. |
Turning of ConPTY worked for me. 👍 To answer your questions... keybindings[
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
{
"key": "alt+f",
"command": "-gitlens.showCommitSearch",
"when": "gitlens:enabled"
},
{
"key": "ctrl+tab",
"command": "-workbench.action.openNextRecentlyUsedEditorInGroup"
},
{
"key": "ctrl+tab",
"command": "-workbench.action.quickOpenNavigateNextInEditorPicker",
"when": "inEditorsPicker && inQuickOpen"
},
{
"key": "ctrl+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "ctrl+k s",
"command": "-workbench.action.files.saveAll"
},
{
"key": "ctrl+k s",
"command": "workbench.action.files.save"
},
{
"key": "ctrl+s",
"command": "-workbench.action.files.save"
},
{
"key": "ctrl+k ctrl+c",
"command": "workbench.action.toggleCenteredLayout"
},
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus"
},
{
"key": "ctrl+shift+x",
"command": "multiCommand.reRun",
"when": "editorTextFocus"
},
{
"key": "ctrl+,",
"command": "workbench.action.openSettingsJson"
},
{
"key": "ctrl+.",
"command": "-settings.action.editFocusedSetting",
"when": "inSettingsSearch"
},
{
"key": "shift+alt+s",
"command": "python.sortImports"
}
] comspec |
Answer... for now. 😀 |
the solution for mee. |
@luchoespejo See a few answers before, it already has been pointed out. |
@zadjii-msft any ideas? ConPTY is launching an external conhost, turning on winpty works. |
... No, I haven't the faintest clue why this isn't working. Does the integrated terminal window display anything, or is it just blank? Does the conhost window that appears have a scrollbar? If the VS Code terminal is displaying something, then maybe the conhost that's getting launched to host conpty is not in headless mode (somehow). If it's totally blank, then I'd imagine that somehow the conhost doesn't think that it's getting activated in conpty mode. Conhost will think it's in conpty mode as long as it has one of the pipes (in/out/signal), and if it's being activated via the API, it should definitely have at least the signal pipe. |
@zadjii-msft looks like the integrated terminal is blank based on https://stackoverflow.com/q/56154957/1156119 |
Huh. That's kinda what I imagined, though I'm not sure it really helps psychic debug it. I can't get this to repro locally, so I'm not sure how to be able to debug this further. Maybe it has something to do with OS architecture vs VS Code architecture? @GollyJer do you have WSL installed? If you do, could you try running cmd.exe from within a wsl prompt? That should activate another conpty, and hopefully help narrow down where this is originating from. |
I haven't repro'd it either, but it has been reported a few times. The code responsible for using conpty is at https://github.com/microsoft/node-pty/blob/master/src/win/conpty.cc if that helps. |
@zadjii-msft This is strange. I just reenabled To answer your question... yes. I have WSL enabled and Ubuntu installed. Running The major change I've made to my system is uninstalling Docker Desktop and disabling HyperV. I had to use VMWare Workstation which doesn't work in conjunction with HyperV. I don't have time to turn on HyperV and reinstall Docker Desktop today (to test if it's the culprit) but I can at some point if necessary. Do other's in this thread have Docker installed? |
Ran into this same problem and the conpty workaround that @GollyJer posted worked for me. I'm on Windows 10 Pro (Build 1903) and running Docker for Windows Desktop. Version: 1.36.1 (system setup) |
@zadjii-msft I've gotten quite a few reports for this, still can't repro myself though and I don't know what I can do or ask to help. |
encountered the same problem. besides the method provided above I also found that by unchecking the "use legacy console" option in cmd/powershell it is able to run in vscode integrated console as before (at least for me) |
Oh my god that's 100% it. Just this week we figured out that if you're using the v1 console, that also affects conpty, and launches the v1 console instead of conpty. We actually just made some changes to the OS this week to force conpty to use the v2 console, so hopefully this will be fixed in Insiders soontm |
@zadjii-msft is there a microsoft/terminal issue tracking this? |
Yep! There's microsoft/terminal#1838 and microsoft/terminal#1935 |
Reproduced at Windows 10 Enterprise build 18362, VS Code v1.37.1. With ConPTY setting turn on, all tried terminals (PS 1.0, PS 6.0, bash) are run in external window. With turning off the setting, it is immediately fixes the issue. |
I encountered this same issue and disabling ConPTY for the integrated terminal fixed it for me (no more external Powershell windows are popping up and it works integrated in VS Code). This only started happening when installed Windows 1903. |
@Scorpibear @gorban do not turn conpty off, turn off "use legacy console" in your conhost settings: #73790 (comment) |
@Tyriar What if I have windows 7 enterprise. |
@StdGit that's using a different system (winpty) that we are no longer improving upon, I'm not sure how you would fix that. Closing since this is fixed in a future version of Windows 10 microsoft/terminal#1838 and nothing more to action. |
I can't get the terminal to launch integrated. It always launches externally.
More details in this StackOverflow question.
System Info
I'm not sure if this is a bug or user error.
Steps to Reproduce:
ctrl
+~
.Does this issue occur when all extensions are disabled?: Yes
Thanks for any help! 👍
The text was updated successfully, but these errors were encountered: