PowerShell / PowerShell/vscode-powershell
Extension randomly runs something in the background when writing in the code pane
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
Related issues:
- 2023-11-18: https://github.com/PowerShell/PSReadLine/issues/3871
- 2023-11-27: https://github.com/Azure/azure-powershell/issues/23573
- 2024-06-25: https://github.com/PowerShell/PSReadLine/issues/4052
While writing PowerShell in the code pane the terminal suddenly seems to have ran something on my unfinished code, and must be exited with CTRL+C to stop.
In this example I was going to write Get-AzResource, only got to Get-AzResour before a warning pops up saying WARNING: Get-AzResour is not found. The most similar Azure PowerShell command is: Get-AzResource.
PowerShell Version
Name Value
---- -----
PSVersion 7.3.7
PSEdition Core
GitCommitId 7.3.7
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Modules
Name Version
---- -------
Az.Accounts 2.13.1
Az.Network 6.2.0
Az.Resources 6.11.1
Microsoft.PowerShell.Management 7.0.0.0
Microsoft.PowerShell.Security 7.0.0.0
Microsoft.PowerShell.Utility 7.0.0.0
PowerShellEditorServices.Commands 0.2.0
PowerShellEditorServices.VSCode 0.2.0
PSReadLine 2.2.6
Visual Studio Code Version
1.83.0
e7e037083ff4455cf320e344325dacb480062c3c
x64
Extension Version
ms-vscode.powershell@2023.6.0
Steps to Reproduce
Write PowerShell in the code view, suddenly something (vscode-powershell? PSReadLine?) triggers something that outputs to the terminal.
Visuals
See summary.
Logs
Tried following https://github.com/PowerShell/vscode-powershell/blob/main/docs/troubleshooting.md#logs
But there's no log directory inside %USERPROFILE%\.vscode\extensions\ms-vscode.powershell-2023.6.0, even after I added following to settings.json:
"powershell editor services.trace.server": "verbose",
"powershell.developer.editorServicesLogLevel": "Diagnostic"
Edit: Logs are apprently located at %APPDATA%\Code\User\globalStorage\ms-vscode.powershell\logs, with one new directory created at each new session.
Edit 2: I reproduced with mentioned changes to settings.json above, sent logs per email.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the unexpected terminal execution while editing PowerShell, then inspect the logs under %APPDATA%\Code\User\globalStorage\ms-vscode.powershell\logs. Read docs/troubleshooting.md and compare the reported behavior with the linked PSReadLine and Azure PowerShell issues. Done means the extension no longer runs unfinished editor input unexpectedly, with a regression test or clear reproduction result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100