PowerShell / PowerShell/vscode-powershell

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

Aperta
#4,963 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Area-Engine Issue-Bug
Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con i file allegati EditorServices.log, StartEditorServices.log e vscode-powershell.log, quindi confronta gli ambienti Windows 2019 e Windows 2022 segnalati usando le versioni elencate di PowerShell, VS Code e dell’estensione. Consulta le indicazioni in troubleshooting.md e riproduci il blocco all’avvio; il lavoro è completato quando l’estensione raggiunge un prompt e il completamento con Tab funziona.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, typescript, vscode
Ambito
developer-experience, devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.