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

PowerShell 7.2.6 output weird text in console and beeps #160419

Closed
Mingun opened this issue Sep 8, 2022 · 10 comments · Fixed by #161821
Closed

PowerShell 7.2.6 output weird text in console and beeps #160419

Mingun opened this issue Sep 8, 2022 · 10 comments · Fixed by #161821
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-pwsh An issue in the terminal specific to PowerShell verified Verification succeeded windows VS Code on Windows issues

Comments

@Mingun
Copy link

Mingun commented Sep 8, 2022

Type: Bug
This question describes situation. After my PC hung and rebooted the VSCode suddenly starts output weird text in integrated terminal and beep each time when command is started/ended. The output looks like:

←]633;C
←]633;E←]633;D←]633;A←]633;P;Cwd=D:\Projects\quick-xmlPS D:\Projects\quick-xml> ←]633;B
←]633;C
←]633;E←]633;D←]633;A←]633;P;Cwd=D:\Projects\quick-xmlPS D:\Projects\quick-xml> ←]633;B$PSVersionTable
←]633;C
Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Microsoft Windows 6.1.7601 Service Pack 1
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

←]633;E;$PSVersionTable←]633;D;0←]633;A←]633;P;Cwd=D:\Projects\quick-xmlPS D:\Projects\quick-xml> ←]633;B

I tried all suggested anwsers on SO, restarting VSCode after each attempt, but nothing worked:

  • I tried to reinstall PowerShell 7
  • terminal.integrated.windowsEnableConpty is true. I tries to set it to false
  • I tried to install PowerShell extension and run both PowerShell: Disable ISE Mode (restore to defaults) and PowerShell: Enable ISE Mode

When I run pwsh.exe, none of that weird text appeared. I have nothing of those files:

←]633;E;$PSVersionTable←]633;D;0←]633;A←]633;P;Cwd=D:\Projects\quick-xmlPS D:\Projects\quick-xml> ←]633;B$PROFILE | Select-Object *Host* | Format-List
←]633;C
AllUsersAllHosts       : D:\Tools\PowerShell\7\profile.ps1
AllUsersCurrentHost    : D:\Tools\PowerShell\7\Microsoft.PowerShell_profile.ps1
CurrentUserAllHosts    : D:\Users\mingun\Documents\PowerShell\profile.ps1
CurrentUserCurrentHost : D:\Users\mingun\Documents\PowerShell\Microsoft.PowerShell_profile.ps1

VS Code version: Code 1.70.3 (a21a160, 2022-08-31T08:03:55.990Z)
OS version: Windows_NT x64 6.1.7601
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz (4 x 3292)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.98GB (10.32GB free)
Process Argv --crash-reporter-id c7675304-5be6-4d39-89fd-645bfb19035b
Screen Reader no
VM 0%
Extensions (37)
Extension Author (truncated) Version
rainbow-brackets 2gu 0.0.6
better-comments aar 3.0.2
numbered-bookmarks ale 8.3.1
asciidoctor-vscode asc 2.9.8
better-toml bun 0.3.2
xml Dot 2.5.1
todo-tree Gru 0.0.215
reg ion 1.1.0
rainbow-csv mec 2.4.0
vscode-language-pack-ru MS- 1.70.8170926
python ms- 2022.14.0
vscode-pylance ms- 2022.9.10
jupyter ms- 2022.7.1102252217
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.9
cpptools ms- 1.12.4
hexeditor ms- 1.9.8
autodocstring njp 0.6.1
peggy-language Peg 2.3.0
java red 1.10.0
vscode-commons red 0.0.6
vscode-yaml red 1.10.1
rust rus 0.7.8
scala sca 0.5.6
crates ser 0.5.10
pegjs-language Sir 1.0.4
vscode-fileutils sle 3.5.0
code-spell-checker str 2.7.2
code-spell-checker-russian str 2.0.6
vscodeintellicode Vis 1.2.25
hg viv 2.0.5
vscode-java-debug vsc 0.44.0
vscode-java-dependency vsc 0.21.0
vscode-java-pack vsc 0.25.1
vscode-java-test vsc 0.37.1
vscode-maven vsc 0.38.0
vscode-todo-highlight way 1.0.5
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
pylanb8912:30545647
vsclangdc:30486549
c4g48928:30535728
hb751961:30553087
dsvsc012cf:30540253
azure-dev_surveyone:30548225
i497e931:30553904

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.71.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@Mingun
Copy link
Author

Mingun commented Sep 8, 2022

I cannot install 1.71.0 because I'm on Windows 7 and support of Windows 7 was dropped in 1.71.0

@meganrogge
Copy link
Contributor

setting terminal.integrated.shellIntegration.enabled to false should fix this for you

@meganrogge meganrogge added terminal-shell-pwsh An issue in the terminal specific to PowerShell info-needed Issue requires more information from poster and removed info-needed Issue requires more information from poster labels Sep 8, 2022
@Mingun
Copy link
Author

Mingun commented Sep 8, 2022

Thank you!!! That works!

@Mingun Mingun closed this as completed Sep 8, 2022
@Tyriar
Copy link
Member

Tyriar commented Sep 8, 2022

Looks like this is Windows 7, so I don't think shell integration works using winpty. Reopening as we should disallow shell integration injection when conpty is not being used.

@Tyriar Tyriar reopened this Sep 8, 2022
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug windows VS Code on Windows issues labels Sep 8, 2022
@Tyriar Tyriar added this to the September 2022 milestone Sep 8, 2022
meganrogge added a commit that referenced this issue Sep 26, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 26, 2022
@alexr00
Copy link
Member

alexr00 commented Sep 30, 2022

What is the best way to verify this?

@alexr00 alexr00 added the verification-steps-needed Steps to verify are needed for verification label Sep 30, 2022
@Tyriar
Copy link
Member

Tyriar commented Sep 30, 2022

This is probably best to do via an extra code review. If you have access to a Windows 7 machine, you can enable the shell integration setting, open pwsh and make sure the sequences don't show up.

@meganrogge meganrogge added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Sep 30, 2022
@Mingun
Copy link
Author

Mingun commented Sep 30, 2022

But how to do that on Windows 7 considering that VSCode is no longer updated on Windows 7?

@Tyriar
Copy link
Member

Tyriar commented Sep 30, 2022

@Mingun good point, Windows 8 or a old version of Windows 10 would also work. Any version before we support conpty (>= build 18309)

@rayane-chegrouche
Copy link

ممكن حل

@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-pwsh An issue in the terminal specific to PowerShell verified Verification succeeded windows VS Code on Windows issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants