PowerShell / PowerShell/vscode-powershell

Powershell Extension never starts. Terminal Message: "Starting server, deregistering host logger and registering shutdown listener"

Offen
#4,963 11 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

Powershell Extension was working for years and then tab complete stopped working. Tying to figure it out, I noticed that on another server that while the default session was starting up, the tab complete in Code editor didn't work. As soon as the Powershell session/terminal was at a prompt, all tab functions as expected. So on my Wondws 2019 server, I noticed that the terminal never gets to a prompt.

PowerShell Version
Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : ConsoleHost
Version          : 7.4.1
InstanceId       : a76ca68b-807a-4ab1-b5a6-aac0b11d35a6
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.88.0
5c3e652f63e798a5ac2f31ffd0d863669328dc4c
x64
Extension Version
ms-vscode.?[7mpowershell?[0m@2024.0.0
Steps to Reproduce

Run VS Code
Click on a PS1 script to load into the Code editor
Auto detect sees Powershell but never gets the extension started.

While troubleshooting, I tried switching to Win PowerShell x86 and it came up OK. I then reviewed the known issue however I am not running Av3cto. In addition one of the servers where this setup does work, both servers share the same security and monitoring software packages.
Problem server is Windows 2019 build 17763
Working server: Windows 2022 Server build 20348
FYI, my debug logs were not in the path listed in the troubleshooting doc. They were located here:
C:\Users<SamAccountName>\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\logs\1712264618-f696d629-7e89-40d6-a0df-133a37127f071712263703182

Visuals

VS Code screen shot
There isn't much to see. The circular arrows lower right on the image spin for as long as VS Code is running. I've had VSCode for running days and the terminal never gets to a prompt.

Logs

The logs were not in the location noted in the article. From the VS Code terminal, the verbose output from debug gave the log path. C:\Users\SATrudeauJ1\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\logs

EditorServices.log
StartEditorServices.log
StartEditorServices-temp3D1BB094.log
StartEditorServices-temp3207AE2C.log
StartEditorServices-temp13480F4F.log
vscode-powershell.log

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 mit den angehängten EditorServices.log, StartEditorServices.log und vscode-powershell.log und vergleiche anschließend die gemeldeten Umgebungen Windows 2019 und Windows 2022 anhand der aufgeführten Versionen von PowerShell, VS Code und der Erweiterung. Prüfe die Hinweise in troubleshooting.md und reproduziere den Hänger beim Start; als erledigt gilt die Aufgabe, wenn die Erweiterung eine Eingabeaufforderung erreicht und die Tab-Vervollständigung funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, typescript, vscode
Bereich
developer-experience, devtools
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.