PowerShell / PowerShell/vscode-powershell

Extension randomly runs something in the background when writing in the code pane

Offen
#4,773 10 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Area-Engine Issue-Bug
Vorherrschende Sprache
TypeScript
Sterne
1.9k
Forks
548
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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:

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.

image

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die unerwartete Terminalausführung beim Bearbeiten von PowerShell zu reproduzieren, und untersuche anschließend die Protokolle unter %APPDATA%\Code\User\globalStorage\ms-vscode.powershell\logs. Lies docs/troubleshooting.md und vergleiche das gemeldete Verhalten mit den verlinkten Issues zu PSReadLine und Azure PowerShell. Als erledigt gilt die Aufgabe, wenn die Erweiterung unvollständige Editoreingaben nicht mehr unerwartet ausführt und ein Regressionstest oder ein eindeutiges Reproduktionsergebnis vorliegt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.