-
Notifications
You must be signed in to change notification settings - Fork 510
VSCode (Powershell) starts with two terminals open: Powershell Integrated and "pwsh" #3925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi there, The PowerShell extension opens the "PSIC" (PowerShell Integrated Console) on activation as it's hosting the LSP server. VS Code opens a regular You can configure both of these options, the extension's with: "powershell.integratedConsole.showOnStartup": false (Note that if you do this, you'll have to manually run "PowerShell: Show Integrated Console" to get it open later, see #3918.) And VS Code's terminal documentation is here. |
Does hosting the LSP server require opening an extra Powershell session? Also worth noting that this was not happening before I installed Powershell 7. |
It requires the PSIC session, yes. But as shown, you can hide that if you wish.
I don't think that VS Code will open a |
"Extra" was the keyword in my question. |
No, as I stated, the extension only starts PSIC. It is not an "extra" is is the one and only that the extension spawns and hides control over. You may hide it at startup if you wish. You can set VS Code to do whatever you wish with your other terminals. You seem to not want it to start a Thanks for using the extension! |
@andschwa You seem to have misunderstood my question.
No. |
The extension does use PowerShell 7 if available. You can actually choose which installed copy of PowerShell you want to use! |
But that's obviously not the case. |
You didn't follow the bug report and provide any logs or screenshots. It does use PowerShell 7, as many users can attest to. Please give us more information if you need further assistance! |
I think this is a case of selective reading.
I didn't think a screenshot is needed given I'm experiencing the exact same issue as the one I linked, and that one does contain a screenshot, but here you go: |
Ok run $PSVersionTable in PSIC. If it's not the version want, follow the instructions I linked you to earlier to change it. |
I'm sorry, I don't understand your question or what you're having trouble with. |
Why does it open two Powershell 7 terminals instead of opening one? |
Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead. |
Since PSIC is used by LSP server, it should be treated as an implementation detail and not be exposed to user as this causes confusion. E.g., when I saw the two sessions, I mistakenly thought that one is using PowerShell 7 and the other is using PowerShell 5.x shipped with Windows and I killed the latter. That said, the PSIC should be hidden by default. |
The vast majority of users request that the integrated terminal is exposed, as it's useful for debugging etc. As pointed out above, you can set it to be hidden on startup and behave exactly as you want. No default will satisfy everyone. |
I have the same issue. |
Agreed, but that's an issue with VS Code that you can't disable that |
Prerequisites
Summary
Same exact issue as microsoft/vscode#136609 except that one was seemingly ignored and closed.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Open a .ps1 file.
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: