Skip to content

Multiple PowerShell Integrated Console tabs in Terminal #2418

Open

Description

@dshuffmaPS

Background:
I'm trying to move from PowerShell ISE to VS Code (and convince 15 coworkers to do the same). The PowerShell Integrated Console (PSIC) tab gives me the ability to have a script in the editor and hit F5 to make it run in the terminal. A normal "powershell" terminal tab will not react to the editor (seems totally disconnected). Same time, if you try to Split the PSIC window, the split screen is also just a normal "powershell" window. So once the one PSIC tab is running, you have to wait until it's done to launch another script from the terminal (an issue if you have a couple scripts to run, each going an hour at a time). The only work-around is to open a new VS Code instance, load up the script there, and run it. This is in contrast to ISE where you can open a new console tab, open the editor for it, and run your script (so 1 ISE window vs multiple VS Code instances).

Request:
So, the feature I'm hoping to see is the ability to have multiple PowerShell Integrated Console tabs in Terminal in order to be able to run multiple scripts from the editor.

PS:
I'm sorry if this isn't the right label or location. New to seeking help, this is my fourth location for this issue 😄. To be honest, I'm not sure if this is something that should work but doesn't, doesn't exist yet (or can't exist ever), or if I'm just missing it.

Activity

  1. ghost added
    Needs: Triage
    on Jan 15, 2020
  2. SydneyhSmith commented on Jan 16, 2020

    @SydneyhSmith
    Collaborator

    dshuffmaPS thanks for opening this issue, you have found the right place for this request 😄

    You mention that you have have multiple terminal tabs, while they still wont be "integrated" in terms of state, you can still run your selected code using f8 and it will run in whatever is the active terminal below.

    We don't have any plans to support this in the near future, and it would likely be a large undertaking but as an open source project we prioritize our workflow based on GitHub issues primarily so if this gets "up votes" it could be something we investigate.

    Thanks again for taking the time for the feature request!

  3. removed
    Needs: Triage
    on Jan 16, 2020
  4. dshuffmaPS commented on Jan 17, 2020

    @dshuffmaPS
    Author

    Sydney Smith (@SydneyhSmith) Thanks so much for the reply! While I do like the idea of the feature still due to smaller things like it ignoring comment lines, I (shamefully) didn't even consider that f8 would give me some additional functionality that works as a sufficient work around!

  5. ghost added
    Needs: Maintainer Attention
    on Jan 17, 2020
  6. rjmholt commented on Jan 17, 2020

    @rjmholt
    Contributor

    Another thing to look into is the temp debugging feature, which runs a script in a new process.

    I should also mention that one of the complicating factors for having multiple Integrated Consoles is the integration. The Integrated Console is just a REPL on top of the PowerShell process running all language service operations. Things like completions and references are stateful in PowerShell, so they depend on other things you've executed so far, and the Integrated Console tracks all that.

    For us to support multiple Integrated Consoles, we'd need to support multiplexing between different PowerShell processes (while keeping them all alive). That's not impossible, but it's also a significant architectural departure from what we have today. It's also fairly heavyweight, and we already have issues open on the footprint of the PowerShell extension as is (because of the number of files PowerShell touches on a system, this is hard to mitigate).

    We have discussed moving things out of process in various cases, but due to the nature of PowerShell it's very hard to do correctly; a lot of PowerShell (both the engine and scripts people write) assume things run in-process.

    With all that said, we might be able to revisit this one day, but not in the medium term timeframe.

  7. Andy-AO commented on Dec 11, 2020

    @Andy-AO

    For me, this can greatly improve the experience

  8. ghost added
    Needs: Maintainer Attention
    on Dec 11, 2020
  9. wsmelton commented on May 23, 2021

    @wsmelton

    You can tell the extension to use the Terminal that is part of VS Code and note the Integrated Terminal.

    This setting was added in 2020 to the extension settings powershell.integratedConsole.showOnStartup. This will cause when you hit F5 or "run selection" (right-click context) to execute in Code's terminal. Be aware that once you start opening multiple terminal though, the execution of code from the editor will always be in the last terminal of focus.

    Debugging will still use the Integrated Terminal since it has a dependency but use the setting above will allow the multiple terminals to be used as part of Code.

  10. ghost added
    Needs: Maintainer Attention
    on May 23, 2021
  11. Wallby commented on Apr 7, 2026

    @Wallby

    I'd like this feature for a different reason. I'd like for the extension to open one instance as a background terminal. What powershell.integratedConsole.startInBackground currently does when set to true. Such that I never get the error if I close the single powershell extension terminal. That there is always one background instance remaining for the extension to use. Not sure if that makes any sense from a design perspective. But I don't want the extension to ever stop unless I explicitly disable the extension. And the extension terminal gets in my way when I have multiple open terminals.

  12. Wallby commented on Apr 7, 2026

    @Wallby

    Shawn Melton (@wsmelton)

    You can tell the extension to use the Terminal that is part of VS Code and note the Integrated Terminal.

    This setting was added in 2020 to the extension settings powershell.integratedConsole.showOnStartup. This will cause when you hit F5 or "run selection" (right-click context) to execute in Code's terminal.

    That setting doesn't do what you say it does? It only hides the panel on startup. It doesn't change which terminal the extension uses at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Extension TerminalIssue-Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions