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
Visual Studio Code Version
1.82.0x64
Extension Version
ms-vscode.powershell@2023.6.0
Steps to Reproduce
Install Visual Studio Code 1.82.0, which is the latest version as of this moment.
Install the PowerShell extension.
Open a new file (Ctrl+N).
Set the language to PowerSehll.
Wait for the PowerShell console to launch. (Some people call it PowerShell's terminal.)
Open Settings (Ctrl+,).
Find "Editor Services Log Level". Confirm that it corresponds to powershell.developer.editorServicesLogLevel.
Use the drop down box to set the setting to None.
Agree to restart the PowerShell language server.
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:
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
ms-vscode.powershell@2023.6.0
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: