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

When showOnStartup is off, integrated console only starts during debugging #2523

Closed
ThubLives opened this issue Mar 5, 2020 · 7 comments · Fixed by #4096
Closed

When showOnStartup is off, integrated console only starts during debugging #2523

ThubLives opened this issue Mar 5, 2020 · 7 comments · Fixed by #4096
Assignees
Labels

Comments

@ThubLives
Copy link

Issue Description

If powershell.integratedConsole.showOnStartup is set to false, the workbench.action.terminal.toggleTerminal command starts the default terminal instead of the integrated PowerShell terminal. In version 2020.1.0 and earlier, the integrated PowerShell terminal would be started when using toggleTerminal, rather than the default terminal.

The only obvious way to start the integrated terminal is to start debugging (F5) or close any open terminals and use F8 to run a line of code from the editor.

Attached Logs

vscode-PS-2020.3.0-logs.zip

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17134
VSCode 1.42.1
PowerShell Extension Version 2020.3.0

PowerShell Information

Name Value
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17134.858
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
powershell ms-vscode 2020.3.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Mar 5, 2020
@rjmholt
Copy link
Collaborator

rjmholt commented Mar 5, 2020

Yes that was #2437, which fixed #2434.

It sounds like we want to break this out into a configuration rather than bake the setting in.

@rjmholt rjmholt added Area-Extension Terminal Issue-Enhancement A feature request (enhancement). and removed Needs: Triage Maintainer attention needed! labels Mar 5, 2020
@ThubLives
Copy link
Author

ThubLives commented Mar 5, 2020

I would suggest replacing the powershell.integratedConsole.showOnStartup config option with a tri-state option something like powershell.integratedConsole.showConsole with states: OnStartup, AsDefault, and OnCodeExecution.

I think that might actually overlap with another option too.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Mar 5, 2020
@ThubLives
Copy link
Author

I would even suggest that the default should be changed to AsDefault, meaning that the integrated console only starts when the user opens the terminal pane. Certainly, I haven't run into any other language extensions that have a shell that opens the terminal on startup, so it always seemed a bit presumptuous for what is primarily a code editor.

I presume that this behaviour was only added in the first place to make people coming from the ISE more comfortable, but since there is now an 'Enable ISE Mode' option in the command palette, it makes more sense to me that this should be what changes the setting to OnStartup, rather than the current default behaviour.

@rjmholt
Copy link
Collaborator

rjmholt commented Mar 5, 2020

Well the Integrated Console runs all the language features of the extension; the terminal is created whether its shown or not, since otherwise the extension won't do very much.

Certainly most users expect the console to show immediately. We are most often compared to the ISE, but even without the comparison it's something that is very much an intentional part of the extension's architecture.

So the three scenarios are:

  • Show the console on startup
  • Don't show any console, but keep the PSIC as the default terminal when the terminal is selected
  • Don't show it and hide it from the list

I'd imagine something like:

powerShell.integratedConsole.availability with values like showOnStartup, addToTerminalList and hide

@SydneyhSmith SydneyhSmith added Area-Configuration Up for Grabs Will shepherd PRs. and removed Needs: Maintainer Attention Maintainer attention needed! labels Mar 5, 2020
@SydneyhSmith
Copy link
Collaborator

@ThubLives you can also open the integrated console using the command PowerShell: Show Integrated Console this does not have a key binding by default, but one could easily be configured...would this achieve your goal?

@ThubLives
Copy link
Author

@rjmholt As someone who has adopted vscode as a common code editor for quite a few languages, it seems odd that the PowerShell extension is the only language-based extension I've used that wants to change the layout every time it's started.
That said, if I can just change a config option to solve it, then my preferences don't have to get in anyone else's way. :)

To that end, these look sensible to me.

I'd imagine something like:

powerShell.integratedConsole.availability with values like showOnStartup, addToTerminalList and hide

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Mar 5, 2020
@ThubLives
Copy link
Author

@SydneyhSmith That will help as a workaround, thank you! It's not a great experience, but ultimately a better config option will take care of that, so I'll use this in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants