Closed
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all 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.
Summary
I've defined functionality in my $profile
but it isn't run at startup.
I have to work around it with . $profile
.
PowerShell Version
Name Value
---- -----
PSVersion 7.1.5
PSEdition Core
GitCommitId 7.1.5
OS Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
1.61.2
6cba118ac49a1b88332f312a8f67186f7f3c1643
x64
Extension Version
ms-vscode.powershell-preview@2021.10.3
Steps to Reproduce
Put code in profile
Start PowerShell extension
Visuals
Logs
2021-10-28 16:02:37.844 -07:00 [VRB] Loading profiles...
2021-10-28 16:02:37.846 -07:00 [INF] Host starting
2021-10-28 16:02:37.874 -07:00 [DBG] Finding descriptors for powerShell/getVersion
2021-10-28 16:02:37.875 -07:00 [DBG] Swapping from "Parallel" to "Serial"
2021-10-28 16:02:37.875 -07:00 [DBG] Cancelling any outstanding requests (switch from parallel to serial)
2021-10-28 16:02:37.875 -07:00 [DBG] Completing existing request process type "Parallel"
2021-10-28 16:02:37.876 -07:00 [DBG] Queueing "Serial":powerShell/getVersion:1 request for processing
2021-10-28 16:02:37.877 -07:00 [DBG] Finding descriptors for textDocument/didOpen
2021-10-28 16:02:37.892 -07:00 [VRB] Created attribute powershell::file:///Users/andschwa/src/test.ps1
2021-10-28 16:02:37.893 -07:00 [VRB] Looking for handler for descriptors textDocument/didOpen
2021-10-28 16:02:37.894 -07:00 [VRB] Checking handler textDocument/didOpen:Microsoft.PowerShell.EditorServices.Handlers.PsesTextDocumentHandler
2021-10-28 16:02:37.894 -07:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.TextDocumentOpenRegistrationOptions
2021-10-28 16:02:37.894 -07:00 [VRB] Document Selector [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1]
2021-10-28 16:02:37.896 -07:00 [VRB] Handler Selected: Microsoft.PowerShell.EditorServices.Handlers.PsesTextDocumentHandler via [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcNotificationHandler`1[[OmniSharp.Extensions.LanguageServer.Protocol.Models.DidOpenTextDocumentParams, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]])
2021-10-28 16:02:37.896 -07:00 [DBG] Queueing "Serial":textDocument/didOpen request for processing
2021-10-28 16:02:37.910 -07:00 [DBG] Finding descriptors for textDocument/documentSymbol
2021-10-28 16:02:37.918 -07:00 [VRB] Found attributes 1, ["powershell::file:///Users/andschwa/src/test.ps1"]
2021-10-28 16:02:37.920 -07:00 [VRB] Looking for handler for descriptors textDocument/documentSymbol
2021-10-28 16:02:37.920 -07:00 [VRB] Checking handler textDocument/documentSymbol:Microsoft.PowerShell.EditorServices.Handlers.PsesDocumentSymbolHandler
2021-10-28 16:02:37.920 -07:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.DocumentSymbolRegistrationOptions
2021-10-28 16:02:37.920 -07:00 [VRB] Document Selector [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1]
2021-10-28 16:02:37.921 -07:00 [VRB] Handler Selected: Microsoft.PowerShell.EditorServices.Handlers.PsesDocumentSymbolHandler via [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler`2[[OmniSharp.Extensions.LanguageServer.Protocol.Models.DocumentSymbolParams, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022],[OmniSharp.Extensions.LanguageServer.Protocol.Models.SymbolInformationOrDocumentSymbolContainer, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]])
2021-10-28 16:02:37.921 -07:00 [DBG] Swapping from "Serial" to "Parallel"
2021-10-28 16:02:37.921 -07:00 [DBG] Completing existing request process type "Serial"
2021-10-28 16:02:37.921 -07:00 [DBG] Queueing "Parallel":textDocument/documentSymbol:2 request for processing
2021-10-28 16:02:37.922 -07:00 [DBG] Finding descriptors for textDocument/codeAction
2021-10-28 16:02:37.943 -07:00 [VRB] Found attributes 1, ["powershell::file:///Users/andschwa/src/test.ps1"]
2021-10-28 16:02:37.943 -07:00 [VRB] Looking for handler for descriptors textDocument/codeAction
2021-10-28 16:02:37.943 -07:00 [VRB] Checking handler textDocument/codeAction:Microsoft.PowerShell.EditorServices.Handlers.PsesCodeActionHandler
2021-10-28 16:02:37.943 -07:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeActionRegistrationOptions
2021-10-28 16:02:37.943 -07:00 [VRB] Document Selector [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1]
2021-10-28 16:02:37.943 -07:00 [VRB] Handler Selected: Microsoft.PowerShell.EditorServices.Handlers.PsesCodeActionHandler ffc73a6d-5840-4d44-be8f-a1edebeba3eb via [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler`2[[OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeActionParams, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022],[OmniSharp.Extensions.LanguageServer.Protocol.Models.CommandOrCodeActionContainer, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]])
2021-10-28 16:02:37.943 -07:00 [DBG] Queueing "Parallel":textDocument/codeAction:3 request for processing
2021-10-28 16:02:38.053 -07:00 [DBG] Finding descriptors for textDocument/foldingRange
2021-10-28 16:02:38.057 -07:00 [VRB] Found attributes 1, ["powershell::file:///Users/andschwa/src/test.ps1"]
2021-10-28 16:02:38.057 -07:00 [VRB] Looking for handler for descriptors textDocument/foldingRange
2021-10-28 16:02:38.062 -07:00 [VRB] Checking handler textDocument/foldingRange:Microsoft.PowerShell.EditorServices.Handlers.PsesFoldingRangeHandler
2021-10-28 16:02:38.062 -07:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.FoldingRangeRegistrationOptions
2021-10-28 16:02:38.062 -07:00 [VRB] Document Selector [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1]
2021-10-28 16:02:38.062 -07:00 [VRB] Handler Selected: Microsoft.PowerShell.EditorServices.Handlers.PsesFoldingRangeHandler via [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler`2[[OmniSharp.Extensions.LanguageServer.Protocol.Models.FoldingRangeRequestParam, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022],[OmniSharp.Extensions.LanguageServer.Protocol.Models.Container`1[[OmniSharp.Extensions.LanguageServer.Protocol.Models.FoldingRange, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]], OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]])
2021-10-28 16:02:38.062 -07:00 [DBG] Queueing "Parallel":textDocument/foldingRange:4 request for processing
2021-10-28 16:02:38.107 -07:00 [DBG] Finding descriptors for textDocument/codeLens
2021-10-28 16:02:38.111 -07:00 [VRB] Found attributes 1, ["powershell::file:///Users/andschwa/src/test.ps1"]
2021-10-28 16:02:38.111 -07:00 [VRB] Looking for handler for descriptors textDocument/codeLens
2021-10-28 16:02:38.111 -07:00 [VRB] Checking handler textDocument/codeLens:Microsoft.PowerShell.EditorServices.Handlers.PsesCodeLensHandlers
2021-10-28 16:02:38.111 -07:00 [VRB] Registration options OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeLensRegistrationOptions
2021-10-28 16:02:38.111 -07:00 [VRB] Document Selector [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1]
2021-10-28 16:02:38.111 -07:00 [VRB] Handler Selected: Microsoft.PowerShell.EditorServices.Handlers.PsesCodeLensHandlers ede1680c-30c9-4cb0-9185-74854a155385 via [powershell], [pwsh], [ps1], [psm1], [psd1], [**/*.ps*1] (targeting OmniSharp.Extensions.JsonRpc.IJsonRpcRequestHandler`2[[OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeLensParams, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022],[OmniSharp.Extensions.LanguageServer.Protocol.Models.CodeLensContainer, OmniSharp.Extensions.LanguageProtocol, Version=0.19.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022]])
2021-10-28 16:02:38.111 -07:00 [DBG] Queueing "Parallel":textDocument/codeLens:5 request for processing
2021-10-28 16:02:38.404 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.PSReadLine2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.410 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
2021-10-28 16:02:38.432 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
2021-10-28 16:02:38.434 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
2021-10-28 16:02:38.434 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.447 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.483 -07:00 [INF] ReadLine overridden with 'Microsoft.PowerShell.EditorServices.Services.PowerShell.Console.PsrlReadLine'
2021-10-28 16:02:38.856 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.857 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:38.928 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.928 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:38.928 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.928 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:38.929 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.929 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:38.974 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:38.974 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:39.218 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:39.221 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:39.222 -07:00 [VRB] Assembly resolve event fired for Microsoft.PowerShell.EditorServices, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:39.222 -07:00 [DBG] Loading PSES DLL using new assembly load context
2021-10-28 16:02:39.553 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: Microsoft.PowerShell.EditorServices.VSCode, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:39.646 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2021-10-28 16:02:40.157 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2021-10-28 16:02:40.164 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: PowerShell Class Assembly, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:40.350 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2021-10-28 16:02:40.354 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2021-10-28 16:02:40.433 -07:00 [VRB] Loaded into load context "Default" System.Runtime.Loader.DefaultAssemblyLoadContext #0: PowerShell Class Assembly, Version=1.0.0.2, Culture=neutral, PublicKeyToken=null
2021-10-28 16:02:41.203 -07:00 [INF] Profiles loaded
2021-10-28 16:02:41.208 -07:00 [VRB] Loaded!