System Details Output
### VSCode version: 1.47.3 91899dcef7b8110878ea59626991a18c8a6a1b3e x64
### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
### PSES version: 2.3.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 7.1.0-preview.5
PSEdition Core
GitCommitId 7.1.0-preview.5
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
I've had other extensions do this and it is very annoying because it creates unnecessary Git diffs / files committed. Basically when I open a PS1 file in my repo, this change gets made to the workspace's settings.json file:

The extensions should never automatically modify my workspace's settings.json file.
The settings.json is being modified behind my back.
vscode-powershell.zip
Follow the instructions in the troubleshooting docs
about capturing and sending logs.
Looks like the test for the deprecated setting isn't specific enough and needs to be modified
Here's the relevant change: https://github.com/PowerShell/vscode-powershell/pull/2830
cc @bergmeister
@rkeithhill Have you got the whitespaceAroundPipe setting defined somewhere (user or workspace scope?).
Because the code is there to move the setting from the deprecated no-op whitespaceAroundPipe setting to the new addWhitespaceAroundPipe.
It's not in my user settings. Here are all the user settings I have defined for PowerShell:
"powershell.codeFolding.showLastLine": false,
"powershell.codeFormatting.preset": "Stroustrup",
"powershell.debugging.createTemporaryIntegratedConsole": false,
"powershell.developer.editorServicesLogLevel": "Diagnostic",
"powershell.developer.editorServicesWaitForDebugger": false,
"powershell.enableProfileLoading": true,
"powershell.integratedConsole.focusConsoleOnExecute": true,
"powershell.integratedConsole.showOnStartup": true,
"powershell.powerShellDefaultVersion": "PowerShell Preview (x64)",
"powershell.scriptAnalysis.enable": true,
"powershell.sideBar.CommandExplorerVisibility": false,
"powershell.useX86Host": false,
There are no PowerShell settings in the workspace settings:

I have same problem:

It keeps on adding it.

If i delete the file

But later on extension will again "fix it".

Same here
+1
For me its also injecting into my workspace settings, not just user settings.
Looks like no matter what, configuration.has(deprecatedSetting) is true.
https://github.com/PowerShell/vscode-powershell/blob/68a8e152afc72b81073c6341ef04b6508dfdcc24/src/session.ts#L335-L335
I've got a fix out for this.
Sorry, I was quite busy the last days, thanks for fixing it. When I was testing it, the debug instance of VS-Code did not have a workspace open with .vscode folder, hence why I did not notice this when testing. I am surprised this is coming up only now since the migration of the old setting to the new setting has been in the preview for a few months now, the last preview only tweaked the behaviour to additionally remove the old setting.
No worries!
I'm still seeing this behavior. What version of the extension has the fix?
Apparently I have two potentially relevant extensions installed:

@AArnott you need to have either Powershell or Powershell Preview installed, not both. It should actually be warning you not to do this and to uninstall one every startup.
It should actually be warning you not to do this and to uninstall one every startup.
Hmm... well I never noticed the warning. Till now. I removed the Preview one and restarted. So far, no settings.json change. :)