vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Corrupted prompt in the terminal

Open Aviw13 opened this issue 3 years ago • 7 comments

Prerequisites

  • [X] I have written a descriptive issue title.
  • [X] I have searched all open and closed issues to ensure it has not already been reported.
  • [X] I have read the troubleshooting guide.
  • [X] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • [x] If this is a security issue, I have read the security issue reporting guidance.

Summary

In the latest version (v2022.12.1) the terminal prompt is corrupted, contains some additional symbols: image

In the previous version (v2022.11.0) there is no such a problem.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.14409.1029
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1029
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.74.2
e8a3071ea4344d9d48ef8a4df2c097372b0c5161
x64

Extension Version

[email protected]

Steps to Reproduce

The issue appeared after an upgrade to the latest version. Downgrading resolves the issue. No extra steps to reproduce, just open the terminal

Visuals

No response

Logs

Logs.zip

Aviw13 avatar Jan 09 '23 10:01 Aviw13

Those are the ANSI escape codes used by VS Code's Shell Integration feature. That should work even with PowerShell 5.1, can you give more details about your environment? Can you also test the latest preview (where we updated the shell integration script)?

Important question: what version of VS Code are you running? Is shell integration working in terminals other than the Extension Terminal?

If you need to get by, you can disable the feature by setting terminal.integrated.shellIntegration.enabled to false.

andyleejordan avatar Jan 09 '23 18:01 andyleejordan

Hi! I've tested the Preview version and the issue is occurring there too. The regular terminal is working well: image

I also tried to disable other extensions to have cleaner environment, but that didn't help.

Aviw13 avatar Jan 13 '23 17:01 Aviw13

What's your setting for terminal.integrated.shellIntegration.enabled?

andyleejordan avatar Jan 14 '23 00:01 andyleejordan

Default, not changed: image

Aviw13 avatar Jan 14 '23 18:01 Aviw13

If you disable it, do things clear up?

andyleejordan avatar Jan 18 '23 18:01 andyleejordan

Yes, disabling resolves the issue Thank you! :)

Aviw13 avatar Jan 19 '23 15:01 Aviw13

Great! I'm not certain why shell integration is failing so badly for you, but at least we've narrowed it down and can clear things up for you.

andyleejordan avatar Jan 19 '23 17:01 andyleejordan