Skip to content
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

Integrated terminal UI reopens unwanted terminal on startup #22968

Closed
daviwil opened this issue Mar 21, 2017 · 3 comments
Closed

Integrated terminal UI reopens unwanted terminal on startup #22968

daviwil opened this issue Mar 21, 2017 · 3 comments
Assignees
Labels
*as-designed Described behavior is as designed terminal Integrated terminal issues

Comments

@daviwil
Copy link
Contributor

daviwil commented Mar 21, 2017

  • 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 @Tyriar @dotps1

@daviwil daviwil changed the title Integrated terminal UI reopens wrong terminal on startup Integrated terminal UI reopens unwanted terminal on startup Mar 21, 2017
@Tyriar
Copy link
Member

Tyriar commented Mar 21, 2017

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 😃

@Tyriar Tyriar added terminal Integrated terminal issues info-needed Issue requires more information from poster labels Mar 21, 2017
@Tyriar Tyriar self-assigned this Mar 21, 2017
@Tyriar
Copy link
Member

Tyriar commented Apr 21, 2017

Closing as designed, track #13267 for a fix.

@Tyriar Tyriar closed this as completed Apr 21, 2017
@Tyriar Tyriar added *as-designed Described behavior is as designed and removed info-needed Issue requires more information from poster labels Apr 21, 2017
@daviwil
Copy link
Contributor Author

daviwil commented Apr 21, 2017

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!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

2 participants