Skip to content

Integrated terminal UI reopens unwanted terminal on startup #22968

Closed

Description

@daviwil
  • VS Code 1.10.2
  • Windows 10 Anniversary

With the latest update of the PowerShell extension (0.10.0), we've added a new "PowerShell Integrated Console" that leverages the createTerminal API in VS Code. Users have remarked that when they restart VS Code after using this terminal, the terminal UI starts immediately with their default terminal app before the PowerShell Integrated Console has a chance to load. More specifically:

  1. User starts VS Code without the Terminal panel active
  2. User has PowerShell 0.10.0 installed, loads a .ps1 file
  3. PowerShell extension loads, creates PowerShell Interactive Console, causing Terminal panel to show
  4. User closes VS Code
  5. Later, user opens VS Code and the Terminal panel appears at startup, loading their default terminal app (probably powershell.exe)
  6. If a .ps1 file is active in the workspace at startup, the "PowerShell Integrated Console" will also be loaded into the Terminal panel

So basically the user ends up having an extra, unwanted process get launched at startup. I've tried closing my terminal at shutdown from my extension's deactivate function but even that doesn't prevent the terminal UI from loading upon next startup.

Is there any way I can suppress this additional terminal?

/cc Daniel Imms (@Tyriar) Thomas Malkewitz (@dotps1)

Activity

  1. changed the title [-]Integrated terminal UI reopens wrong terminal on startup[/-] [+]Integrated terminal UI reopens unwanted terminal on startup[/+] on Mar 21, 2017
  2. Tyriar commented on Mar 21, 2017

    @Tyriar
    Contributor

    No there's no way to suppress this currently. I also ran into the problem when making https://marketplace.visualstudio.com/items?itemName=Tyriar.terminal-tabs

    This is happening because the workbench is restored as it was previously, which means if a terminal was up it will restore the terminal and then create a terminal process since the terminal cannot be open currently without a running process.

    I believe #13267 is what you actually want to help with this, that way during launch you could suppress the terminal by immediately disposing it. If you have another proposal to work around the problem without adding that API I'm open to ideas 😃

  3. added
    terminal
    info-needed
    on Mar 21, 2017
  4. Tyriar commented on Apr 21, 2017

    @Tyriar
    Contributor

    Closing as designed, track #13267 for a fix.

  5. added
    *as-designed
    and removed
    info-needed
    on Apr 21, 2017
  6. daviwil commented on Apr 21, 2017

    @daviwil
    ContributorAuthor

    Yeah, I suppose we could try to use this API to abort the initial terminal if the PowerShell extension's terminal was open at the end of the last session. Let's give it a shot!

  7. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*as-designedterminal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions