I have the PowerShell extension installed under VSCode. When I open up a PowerShell script, VS Code automatically pops open a "PowerShell Integrated Console" window in my terminal. It's different from the normal PowerShell terminal:
It's better than the default one because keyboard shortcuts like Ctrl Backspace to delete a word work. But when I try to open one of these fancy terminals myself, the option isn't there:
How can I get one of these improved terminals without opening a script file, and how can I get VSCode to use them automatically instead of the old PS terminal?
CodePudding user response:
As of version 2022.5.1 of the PowerShell extension for VSCode (Visual Studio Code), the only way to activate or launch the PIC (PowerShell Integrated Console) on demand is:
Use the
PowerShell: Show Integrated Console
command from the command palette.Additionally, you may assign a keyboard shortcut to the command, by clicking the cog icon on the right edge of the command palette entry.
Because the PIC doesn't have an external executable entry point you can not define it as a custom shell profile (at least as of VSCode 1.67.1).
GitHub issue #3918 discusses implementing simpler ways to activate / load the PIC on demand as a future enhancement:
Making the PIC show in the list of available shells (as shown in your question, analogous to the extension-contributed
JavaScript Debug Terminal
entry) is one of the suggestions, but the concern is that there can only be one PIC as of this writing, so such an entry would behave differently from other shells in the list, which create a new session every time.However, this concern would go away if support for multiple PICs were to be implemented, which is being proposed in GitHub issue #2418.