Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Does not load profile #5253

Closed
Closed
Labels
Issue-BugA bug to squash. Needs: TriageMaintainer attention needed!
@o-l-a-v

Description

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

Environment:

  • Windows 11 24H2 x64 26100.4652
  • VSCode v1.102.3 x64 user install
  • PowerShell v7.5.2 installed with Scoop
  • Tried with vscode-powershell stable v2025.2.0 and preview v2025.3.1
  • VSCode user settings.json contains "powershell.enableProfileLoading": true
  • profile.ps1 located in $PROFILE.CurrentUserAllHosts / %USERPROFILE%\Documents\profile.ps1

My very minimal VSCode config, just installed this OS:

{
 "githubPullRequests.createOnPublishBranch": "never",
 "powershell.enableProfileLoading": true,
 "powershell.integratedConsole.showOnStartup": false,
 "powershell.integratedConsole.suppressStartupBanner": true,
 "powershell.powerShellAdditionalExePaths": {
 "7.5": "C:\\Users\\olavb\\scoop\\apps\\pwsh75\\current\\pwsh.exe"
 },
 "powershell.powerShellDefaultVersion": "7.5",
 "workbench.startupEditor": "none"
}

Observations:

  • Profile loads when opening pwsh.exe v7.5.2, pwsh.exe v7.4.11, and Windows Terminal.

With trace output I can see the following for the PowerShell extension:

2025年08月01日 13:34:36.806 [info] Restarting session...
2025年08月01日 13:34:36.806 [debug] Session status changing from 'Running' to 'Stopping'.
2025年08月01日 13:34:36.814 [debug] Disposing PowerShell process with PID: 19368
2025年08月01日 13:34:36.815 [debug] Session status changing from 'Stopping' to 'Not Started'.
2025年08月01日 13:34:36.815 [debug] Session status changing from 'Not Started' to 'Starting'.
2025年08月01日 13:34:36.832 [debug] Finding PowerShell...
2025年08月01日 13:34:36.857 [debug] Session status changing from 'Starting' to 'Starting'.
2025年08月01日 13:34:36.857 [info] Starting '7.5' at: C:\Users\olavb\scoop\apps\pwsh75\current\pwsh.exe
2025年08月01日 13:34:36.857 [debug] Starting process: C:\Users\olavb\scoop\apps\pwsh75\current\pwsh.exe -NoProfile -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\olavb\.vscode\extensions\ms-vscode.powershell-202520\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2025.2.0' -BundledModulesPath 'c:\Users\olavb\.vscode\extensions\ms-vscode.powershell-202520\modules' -EnableConsoleRepl -StartupBanner '' -LogLevel 'Warning' -LogPath 'c:\Users\olavb\AppData\Roaming\Code\logs20250801円T133241\window1\exthost\ms-vscode.powershell' -SessionDetailsPath 'c:\Users\olavb\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-8344-769411.json' -FeatureFlags @() 
2025年08月01日 13:34:37.077 [info] PowerShell process started with PID: 20252
2025年08月01日 13:34:37.077 [debug] Waiting for session file: file:///c%3A/Users/olavb/AppData/Roaming/Code/User/globalStorage/ms-vscode.powershell/sessions/PSES-VSCode-8344-769411.json
2025年08月01日 13:34:37.493 [debug] Session file found.
2025年08月01日 13:34:37.498 [debug] Session details: {
 "status": "started",
 "languageServiceTransport": "NamedPipe",
 "languageServicePipeName": "\\\\.\\pipe\\PSES_2amnokd3.004",
 "debugServiceTransport": "NamedPipe",
 "debugServicePipeName": "\\\\.\\pipe\\PSES_eqgbuk0y.cke",
 "powerShellVersion": "7.5.2"
}
2025年08月01日 13:34:37.498 [debug] Connecting to language service...
2025年08月01日 13:34:37.503 [debug] Language service connected.
2025年08月01日 13:34:38.638 [trace] [PSES] OmniSharp.Extensions.LanguageServer.Server.Configuration.DidChangeConfigurationProvider: No ConfigurationItems have been defined, configuration won't surface any configuration from the client! | 
2025年08月01日 13:34:38.668 [info] Started PowerShell v7.5.2.
2025年08月01日 13:34:38.668 [debug] Session status changing from 'Starting' to 'Running'.
2025年08月01日 13:34:38.668 [debug] Environment variable 'POWERSHELL_UPDATECHECK' was 'Off'.

I see a -NoProfile in there.

PowerShell Version

See original post

Visual Studio Code Version

See original post

Extension Version

See original post

Steps to Reproduce

See original post

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugA bug to squash. Needs: TriageMaintainer attention needed!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /