microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.44k stars 29.35k forks source link

Shell integration is being activated on Windows where conpty doesn't exist #173243

Closed markel-official closed 1 year ago

markel-official commented 1 year ago

Type: Bug

Hi, after recent VSCode update now when I open the terminal via workspace (clicking "Open in integrated terminal") - it shows some weird line like "←]633;P;IsWindows=←]633;A←]633;P;Cwd=C:\x5cUsers\x5cserge\x5cDesktop\x5cProjects\x5cProjectsName\x5cProjectsName\x5cfrontendPS C:\Users\serge\Desktop\Projects\ProjectsName\ProjectsName\frontend> ←]633;" and then computer makes two sounds of the error.

It have never happened before and everything was working fine - VSCode would open a terminal with the correct path without errors.

I am pretty sure your wonderful team will fix this little bug. Thank you for making such an amazing product!

VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:23:45.584Z) OS version: Windows_NT x64 6.3.9600 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 4500U with Radeon Graphics (6 x 2371)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|7.42GB (3.50GB free)| |Process Argv|--crash-reporter-id 0e3365a3-6e74-4fc7-8263-fcd53ca490e7| |Screen Reader|no| |VM|0%|
Extensions (14) Extension|Author (truncated)|Version ---|---|--- formatter-pug|ale|0.0.1 es7-react-js-snippets|dsz|4.4.3 prettier-vscode|esb|9.10.4 auto-rename-tag|for|0.1.10 code-beautifier|mic|2.3.3 vetur|oct|0.36.1 webgl-glsl-editor|rac|1.3.3 vscode-xml|red|0.24.0 LiveServer|rit|5.7.9 markdown-preview-enhanced|shd|0.6.7 vscode-scss-formatter|sib|2.4.4 shader|sle|1.1.5 autoimport|ste|1.5.4 volar|Vue|1.0.24
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 vscccc:30610679 pyindex848cf:30577861 nodejswelcome1cf:30587006 2e4cg342:30602488 f6dab269:30613381 pythonsymbol12:30657548 ```
qin11152 commented 1 year ago

i have same error

meganrogge commented 1 year ago

Cannot repro on mac or windows

captain0jay commented 1 year ago

Same problem, please suggest some solution for it or give some information like is there a fault in this version or did i install something fishy.

Tyriar commented 1 year ago

Are you on Windows 7?

soulfirewind commented 1 year ago

←]633;P;IsWindows=←]633;A←]633;P;Cwd=C:\x5c Getting the same error after upgrade...? Help. Windows 8.1 (yeah I know I need to upgrade,... We've got computers 7, 8, 10 & 11 here)

... OK after looking into this a little more I believe my issue was my need to upgrade this terminal - I just don't want the down time at the moment...

Anyways ConPTY requires Windows 10 (build 18309+) therefor fishing around in my terminal settings I set it to false.

settings.json "terminal.integrated.windowsEnableConpty": false

Hope this helps somebody, cheers.

Tyriar commented 1 year ago

For Windows 7 we don't support it anymore, for other versions or 8 and 10 (below build 18309) I see we're missing a check here to turn off shell integration when winpty is forced:

https://github.com/microsoft/vscode/blob/77219513f9917b11ce94d82925c0e14f46c8efaf/src/vs/platform/terminal/node/terminalEnvironment.ts#L119

The fix will behave essentially the same as setting "terminal.integrated.windowsEnableConpty": false so it's a good workaround in the meantime.

captain0jay commented 1 year ago

beep sound comes and still not working for windows 8.1, please helppp!

soulfirewind commented 1 year ago

There was a work around for we had for this issue but I believe they have updated the code since then to address this issue. You may have a different problem...?

captain0jay commented 1 year ago

There was a work around for we had for this issue but I believe they have updated the code since then to address this issue. You may have a different problem...?

yeah for me terminal is still not working in vscode, i have windows 8.1 and i have infact installed latest version of vscode and the problem still exist.

captain0jay commented 1 year ago

There was a work around for we had for this issue but I believe they have updated the code since then to address this issue. You may have a different problem...?

yeah for me terminal is still not working in vscode, i have windows 8.1 and i have infact installed latest version of vscode and the problem still exist.

exact problem is when i open terminal in vscode it just goes blank nothing starts just a black portion and a few beeping sound at start, the problems section is working perfectly but i have to use cmd for my terminal needs.

soulfirewind commented 1 year ago

You know what's weird is I had taken the work around out of my settings.json file to see if the update had taken place and everything has been fine for a few days. Now after seeing your response and pulling up the terminal, I'm having the issue again. Maybe another update brought back the issue. Anyways no problem, made the change back to my settings and the problem is fixed. Your issue might be different idk. Have you tried adding, "terminal.integrated.windowsEnableConpty": false to your settings.json file? This thread seemed to be centered around an issue with forcing ConPTY on older systems. Try the work around out and if that doesn't fix it start a new thread since this one has been "closed".

vscodenpa commented 1 year ago

Friendly ping! Looks like this issue requires some further steps to be verified. Please provide us with the steps necessary to verify this issue.

vscodenpa commented 1 year ago

This bug has been fixed in the latest release of VS Code Insiders!

@markel-official, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version d0acdbff1f30eac7cc68930013485276d1bae0ec of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

doc-nl commented 1 year ago

Problem still exists on Windows 2012R2

Version: 1.76.0-insider (system setup) Commit: ead95b4a7014d12ddcb2dd6ddcb16e73f1e4cd67 Date: 2023-02-24T21:55:13.530Z Electron: 19.1.10 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 6.3.9600 Sandboxed: Yes

Tyriar commented 1 year ago

@doc-nl I'm not sure why it wouldn't be fixed for you, but it looks like support for that ended October 9, 2018 https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2012-r2

If it's the same problem you can workaround the issue by setting "terminal.integrated.shellIntegration.enabled": false

Tyriar commented 1 year ago

Removing bug as we don't need to verify

doc-nl commented 1 year ago

extended support is until October this year. Windows 8.1 was just out of the extended support Jan 2023, but 2012R2 is supported a bit longer. But we will replace our servers soon with 2022, so then the problem for us will be fixed :)