You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. After installing the PowerShell extension, several new settings get added to Visual Studio Code, one of them is called "PowerShell › Developer: Editor Services Log Level" (powershell.developer.editorServicesLogLevel). The UI offers me several choices for this setting:
Diagnostics
Verbose
Normal
Warning
Error
None
However, it appears the "None" setting is invalid.
Today, I set powershell.developer.editorServicesLogLevel to None (via the UI). The extension prompted for a restart. Open the restart, the extension failed to start, generating the following error message:
The terminal process "C:\Program Files\PowerShell\7\pwsh.exe [...]" terminated with exit code: 1.
Full error message (click me)
The terminal process "C:\Program Files\PowerShell\7\pwsh.exe '-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', 'Import-Module 'c:\Users\BRAINZ.vscode\extensions\ms-vscode.powershell-2023.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2023.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\BRAINZ.vscode\extensions\ms-vscode.powershell-2023.6.0\modules' -EnableConsoleRepl -StartupBanner "PowerShell Extension v2023.6.0
Copyright (c) Microsoft Corporation.
https://aka.ms/vscode-powershell
Type 'help' to get help.
" -LogLevel 'None' -LogPath 'c:\Users\BRAINZ\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\logs\1694633969-3d04be6b-b942-463a-8b12-1455353dd7661694633907551\EditorServices.log' -SessionDetailsPath 'c:\Users\BRAINZ\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-8676-414595.json' -FeatureFlags @() '" terminated with exit code: 1.
I tried simulating the launch process explained in the message by issuing the following commands:
&'C:\Program Files\PowerShell\7\pwsh.exe'-NoProfile -ExecutionPolicy 'Bypass'Import-Module'e:\Programs\Visual Studio Code\data\extensions\ms-vscode.powershell-2023.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'Start-EditorServices-HostName 'Visual Studio Code Host'-HostProfileId 'Microsoft.VSCode'-HostVersion '2023.6.0'-AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'e:\Programs\Visual Studio Code\data\extensions\ms-vscode.powershell-2023.6.0\modules'-EnableConsoleRepl -StartupBanner "PowerShell Extension v2023.6.0Copyright (c) Microsoft Corporation.https://aka.ms/vscode-powershellType 'help' to get help."-LogLevel 'None'-LogPath 'e:\Programs\Visual Studio Code\data\user-data\User\globalStorage\ms-vscode.powershell\logs\1694635914-512c5bcf-1a69-4a92-94a7-14df9ca2e3c21694635892002\EditorServices.log'-SessionDetailsPath 'e:\Programs\Visual Studio Code\data\user-data\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-9504-479834.json'-FeatureFlags @()
And here is the output:
Start-EditorServices:
Line |
6 | " -LogLevel 'None' -LogPath 'e:\Programs\Visual Studio Code\data\user …
| ~~~~~~
| Cannot bind parameter 'LogLevel'. Cannot convert value "None" to type "Microsoft.PowerShell.EditorServices.Hosting.PsesLogLevel". Error: "Unable to match the identifier name None to a valid enumerator name. Specify one of the following enumerator names and try again:
Diagnostic, Verbose, Normal, Warning, Error"
PowerShell Version
Name Value---- -----PSVersion 7.3.6PSEdition CoreGitCommitId 7.3.6OS Microsoft Windows 10.0.19045Platform Win32NTPSCompatibleVersions {1.0, 2.0, 3.0, 4.0.}PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1WSManStackVersion 3.0
Prerequisites
Summary
Hello. After installing the PowerShell extension, several new settings get added to Visual Studio Code, one of them is called "PowerShell › Developer: Editor Services Log Level" (
powershell.developer.editorServicesLogLevel
). The UI offers me several choices for this setting:However, it appears the "None" setting is invalid.
Today, I set
powershell.developer.editorServicesLogLevel
toNone
(via the UI). The extension prompted for a restart. Open the restart, the extension failed to start, generating the following error message:Full error message (click me)
I tried simulating the launch process explained in the message by issuing the following commands:
And here is the output:
PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]
Steps to Reproduce
powershell.developer.editorServicesLogLevel
.Visuals
The

powershell.developer.editorServicesLogLevel
in its default mode.Changing it:

The restart prompt:

A PowerShell error message briefly flashes across the screen, then disappears.

Visual Studio Code reports error.

Logs
This issue is about logs themselves.
The text was updated successfully, but these errors were encountered: