Skip to content

Setting integratedConsole.showOnStartup to false is not being respected in v2022.8.4 #4151

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

Closed
6 tasks done
szymonos opened this issue Aug 24, 2022 · 7 comments · Fixed by #4152
Closed
6 tasks done
Assignees
Labels
Area-Configuration Issue-Enhancement A feature request (enhancement).

Comments

@szymonos
Copy link

szymonos commented Aug 24, 2022

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

In the PowerShell Preview extension the setting "powershell.integratedConsole.showOnStartup": false is not being respected and the PowerShell Extension terminal is always visible.

On existing PowerShell extension (v2022.7.2) the PowerShell Extension terminal is not visible and you can safely close all the active terminals without errors: "The Powershell Extension Terminal has stopped...", "Connection to PowerShell Editor Services (...) was closed...".

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.70.2
e4503b30fc78200f846c62cf8091b76ff5547662
x64

Extension Version

Steps to Reproduce

Set "powershell.integratedConsole.showOnStartup": false and open any terminal with ps1 script active in Editor pane. The PowerShell Extension terminal will be opened along the selected terminal which shouldn't be the case.

Visuals

No response

Logs

No response

@szymonos szymonos added the Issue-Bug A bug to squash. label Aug 24, 2022
@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 24, 2022
@andyleejordan
Copy link
Member

Are you saying that the pane is opened if it is not already? Please see #4096.

@andyleejordan andyleejordan added Needs: Author Feedback Please give us the requested feedback! and removed Needs: Triage Maintainer attention needed! labels Aug 24, 2022
@szymonos
Copy link
Author

szymonos commented Aug 24, 2022

OMG, I'm gutted. It completely breaks my workflow in VSCode. I'm working with many repositories in a single workspace, and the easiest way to change context of the terminal is to just close pwsh and open it in context of another repository.

I don't need, and I don't want the PowerShell Extension terminal to be visible in opened terminals ever, unless I can close it without errors and keeping my intellisense working, or maybe pin it, so I couldn't close it. I just work with too many terminals to keep an eye which one may be closed next from shortcut command.

I practically spend half my life in PowerShell terminal in VSC, and it was an excellent experience. Please, please bring back the option to completely hide it - the idea of the new background process settings mentioned in #4096 is also great.

One more thing, terminal integration just has been introduced last month to VSCode, and it doesn't even work in PowerShell Extension terminal, what's the point introducing such features if you kill the possibility to use it?

@ghost ghost added Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Author Feedback Please give us the requested feedback! labels Aug 24, 2022
@andyleejordan
Copy link
Member

OMG, I'm gutted. It completely breaks my workflow in VSCode. I'm working with many repositories in a single workspace, and the easiest way to change context of the terminal is to just close pwsh and open it in context of another repository.

Sorry about that, but it unfortunately caused a lot more issues the other way around!

I don't need, and I don't want the PowerShell Extension terminal to be visible in opened terminals ever, unless I can close it without errors and keeping my intellisense working, or maybe pin it, so I couldn't close it. I just work with too many terminals to keep an eye which one may be closed next from shortcut command.

The terminal does need to be running for your IntelliSense to work. I like the idea of making it pin-able. Can your shortcut command just avoid closing the terminal explicitly named "PowerShell Extension"? All your other terminals should be named "pwsh" or at least something different from the extension's terminal.

I practically spend half my life in PowerShell terminal in VSC, and it was an excellent experience. Please, please bring back the option to completely hide it - the idea of the new background process settings mentioned in #4096 is also great.

We could add a separate setting that does not collide with showOnStartup that comes with a big warning about the fact that the PowerShell Extension terminal won't be accessible without explicitly bringing it up, and then once up, won't be hideable again, but I don't really like that. I'm hoping there's another way we can improve your workflow.

One more thing, terminal integration just has been introduced last month to VSCode, and it doesn't even work in PowerShell Extension terminal, what's the point introducing such features if you kill the possibility to use it?

I'm sorry, I don't know what you mean here. We're not killing any possibility of using it at all; in fact, getting the terminal integration in VS Code working in the PowerShell Extension Terminal is on our shortlist of new feature work and should be available pretty soon! I have no idea what gave you the impression we were "killing" that feature.

@szymonos
Copy link
Author

szymonos commented Aug 25, 2022

The terminal does need to be running for your IntelliSense to work. I like the idea of making it pin-able.

I know that, and it was running, I just wasn't bothered by it in the terminal pane, and could close all active terminals without facing any errors.

Can your shortcut command just avoid closing the terminal explicitly named "PowerShell Extension"? All your other terminals should be named "pwsh" or at least something different from the extension's terminal.

Any idea how can I achieve that? I'm using workbench.action.terminal.kill command for that, and was looking for available properties to put in "when statement", but had hard time finding property for that. The only terminal* property returning a string I've found is terminalShellType and it's not what I could use there, right?

Edit. OK, so the terminalShellType is kind of the property I was looking for, but there are two issues with it. First - "PowerShell Extension" terminal has pwsh label, so if I put the "when": "terminalShellType != 'pwsh'" statement, it won't close pwsh terminal neither. Second is that it does work only on Windows (as mentioned there), and I am using PowerShell on Linux quite a lot.

We could add a separate setting that does not collide with showOnStartup that comes with a big warning about the fact that the PowerShell Extension terminal won't be accessible without explicitly bringing it up, and then once up, won't be hideable again, but I don't really like that. I'm hoping there's another way we can improve your workflow.

Honestly, I have no idea what can be done here if you don't like the idea of hiding that.
Overall, I strongly believe it is a bad move. I'm a big PowerShell (in VSCode) evangelist saying left and right, that it is the best shell experience ever, but I can hardly argue with people, saying that the PowerShell sucks, because it is crashing on them every time they close the terminal. Saying they shouldn't close this particular terminal, because extension authors thought it is better for them, isn't the best answer, IMO.
It is just bad UX, and normal action viable for all other shells shouldn't result in errors in this particular case.

I'm sorry, I don't know what you mean here. We're not killing any possibility of using it at all; in fact, getting the terminal integration in VS Code working in the PowerShell Extension Terminal is on our shortlist of new feature work and should be available pretty soon! I have no idea what gave you the impression we were "killing" that feature.

OK, sorry, I probably overreacted. It was just a bad timing, I've simply updated VSCode month ago, got the terminal integration feature and the same time update to PowerShell-Preview, which forced the PowerShell Extension terminal on me, and the feature was gone, so the impression was, like it took it from me. Switched back to PowerShell (non-preview) and thought it's probably just a bug and will be ironed out for 2022.8 GA release, but checked it in latest preview, and being still there, motivated me to make the bug issue.

@andyleejordan
Copy link
Member

Ok, we were considering a startInBackground option in #4096 that more explicitly enables this option. The thing is, many people want to use showOnStartup = false without backgrounding the process. So we just need to separate the settings. Give me a bit!

@andyleejordan andyleejordan changed the title Setting powershell.integratedConsole.showOnStartup to false is not being respected in PowerShell-Preview v2022.8.4 Setting integratedConsole.showOnStartup to false is not being respected in v2022.8.4 Aug 25, 2022
@andyleejordan andyleejordan added Issue-Enhancement A feature request (enhancement). Area-Configuration and removed Issue-Bug A bug to squash. Needs: Maintainer Attention Maintainer attention needed! labels Aug 25, 2022
@andyleejordan andyleejordan self-assigned this Aug 25, 2022
@andyleejordan andyleejordan moved this to In Progress in American Pharoah Aug 25, 2022
Repository owner moved this from In Progress to Done in American Pharoah Aug 25, 2022
@szymonos
Copy link
Author

szymonos commented Aug 25, 2022

Ok, we were considering a startInBackground option in #4096 that more explicitly enables this option. The thing is, many people want to use showOnStartup = false without backgrounding the process. So we just need to separate the settings. Give me a bit!

Wow, great. Thank you so much :). And I agree that the new setting name much better reflects what it does and is no more confusing.

@andyleejordan
Copy link
Member

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Configuration Issue-Enhancement A feature request (enhancement).
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants