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
When opening my workspace, the integrated powershell terminal does not automatically open like it used to. It should automatically open per the "powershell.startAutomatically": true entry, but it doesn't. I don't know for sure, but this seems to be a regression with the latest update to VSCode (v1.115). It could be something else though.
If I comment out the "powershell.cwd" line in my workspace file, then PowerShell DOES correctly start automatically. But not in my workspace folder.
After investigating further, I've modified my workspace config to comment out the "powershell.cwd" line, and the integrated terminal starts automatically.
If the "powershell.cwd": "${workspaceFolder}" line isn't commented out, I don't get Rich Shell Integration and Intellisense doesn't work at all.
Can someone on the VSCode Powershell team check if this behavior is happening to them or any other users? I'd really like to keep my "powershell.cwd": "${workspaceFolder}" config definition so the terminal opens to my workspace folder.
Observe that the integrated powershell terminal (Shell Integration: Rich) does not automatically open and the "Restart Powershell Session" command does nothing.
Comment out the "powershell.cwd": "${workspaceFolder}" line in your code-workspace file.
Now reopen the same workspace.
Observe the powershell integrated terminal now opens automatically (but does not navigate to ${workspaceFolder}.
The "Restart Powershell Session" command now works properly.
Visuals
Here's a screen recording showing the bugged behavior:
powershell-cwd-demonstration.mp4
Logs
Powershell log from the "Output" tab with "PowerShell" selected in the dropdown:
2026-04-08 21:08:12.542 [info] Visual Studio Code: v1.115.0 64-bit on Windows 64-bit
2026-04-08 21:08:12.542 [info] PowerShell Extension: v2025.4.0
2026-04-08 21:08:12.573 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:12.742 [info] PowerShell process started with PID: 23800
2026-04-08 21:08:15.205 [info] Started PowerShell v7.6.0.
2026-04-08 21:08:15.782 [info] PowerShell is up-to-date.
2026-04-08 21:08:28.901 [info] Restarting session...
2026-04-08 21:08:28.928 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:29.039 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:08:38.093 [info] Restarting session...
2026-04-08 21:08:38.095 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:38.203 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:08:38.574 [info] Restarting session...
2026-04-08 21:08:38.583 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:38.694 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:08:38.728 [info] Restarting session...
2026-04-08 21:08:38.736 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:38.847 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:08:38.872 [info] Restarting session...
2026-04-08 21:08:38.881 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:38.991 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:08:38.992 [info] Restarting session...
2026-04-08 21:08:39.000 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:08:39.105 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:09:02.722 [info] Restarting session...
2026-04-08 21:09:02.729 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:09:02.879 [info] PowerShell process started with PID: 121984
2026-04-08 21:09:04.193 [info] Started PowerShell v7.6.0.
2026-04-08 21:09:04.646 [info] PowerShell is up-to-date.
2026-04-08 21:13:31.306 [info] Restarting session...
2026-04-08 21:13:31.347 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:13:31.452 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:13:37.709 [info] Restarting session...
2026-04-08 21:13:37.713 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:13:37.832 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:13:47.307 [info] Restarting session...
2026-04-08 21:13:47.315 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:13:47.467 [info] PowerShell process started with PID: 104268
2026-04-08 21:13:48.744 [info] Started PowerShell v7.6.0.
2026-04-08 21:13:49.123 [info] PowerShell is up-to-date.
2026-04-08 21:26:22.525 [info] Restarting session...
2026-04-08 21:26:22.541 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:26:22.647 [warning] PowerShell process terminated or Extension Terminal was closed, PID: undefined
2026-04-08 21:27:09.546 [info] Restarting session...
2026-04-08 21:27:09.551 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2026-04-08 21:27:09.716 [info] PowerShell process started with PID: 101156
2026-04-08 21:27:11.090 [info] Started PowerShell v7.6.0.
2026-04-08 21:27:11.542 [info] PowerShell is up-to-date.
Prerequisites
Summary
In my Powershell
code-workspace, I have the following defined:{ "folders": [ { "path": "." } ], "settings": { "terminal.integrated.cwd": "${workspaceFolder}", "powershell.cwd": "${workspaceFolder}", "powershell.startAutomatically": true, "powershell.integratedConsole.showOnStartup": true, "files.defaultLanguage": "powershell", "terminal.integrated.profiles.windows": { "PowerShell": { "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe", "args": [ "-noexit", "-Command", "Import-Module FMDevToolbox -Force" ] } } } }When opening my workspace, the integrated powershell terminal does not automatically open like it used to. It should automatically open per the
"powershell.startAutomatically": trueentry, but it doesn't. I don't know for sure, but this seems to be a regression with the latest update to VSCode (v1.115). It could be something else though.If I comment out the
"powershell.cwd"line in my workspace file, then PowerShell DOES correctly start automatically. But not in my workspace folder.After investigating further, I've modified my workspace config to comment out the
"powershell.cwd"line, and the integrated terminal starts automatically.Working Config:
{ "folders": [ { "path": "." } ], "settings": { "terminal.integrated.cwd": "${workspaceFolder}", // "powershell.cwd": "${workspaceFolder}", "powershell.startAutomatically": true, "powershell.integratedConsole.showOnStartup": true, "files.defaultLanguage": "powershell", "terminal.integrated.profiles.windows": { "PowerShell": { "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe", "args": [ "-noexit", "-Command", "Import-Module FMDevToolbox -Force" ] } } } }Unfortunately now powershell doesn't automatically open to my
${workspaceFolder}, and nor do I get a terminal with Rich Shell Integration.The rich terminal shows the following on hover:
If the
"powershell.cwd": "${workspaceFolder}"line isn't commented out, I don't get Rich Shell Integration and Intellisense doesn't work at all.Can someone on the VSCode Powershell team check if this behavior is happening to them or any other users? I'd really like to keep my
"powershell.cwd": "${workspaceFolder}"config definition so the terminal opens to my workspace folder.PowerShell Version
Visual Studio Code Version
Extension Version
[email protected]Steps to Reproduce
code-workspacefile inside this folder with the following contents:{ "folders": [ { "path": "." } ], "settings": { "terminal.integrated.cwd": "${workspaceFolder}", "powershell.cwd": "${workspaceFolder}", "powershell.startAutomatically": true, "powershell.integratedConsole.showOnStartup": true, "files.defaultLanguage": "powershell", "terminal.integrated.profiles.windows": { "PowerShell": { "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe", "args": [ "-noexit" ] } } } }"powershell.cwd": "${workspaceFolder}"line in yourcode-workspacefile.${workspaceFolder}.Visuals
Here's a screen recording showing the bugged behavior:
powershell-cwd-demonstration.mp4
Logs
Powershell log from the "Output" tab with "PowerShell" selected in the dropdown: