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

A way to stop the integrated terminal from launching at startup #147192

Closed
CrendKing opened this issue Apr 11, 2022 · 9 comments
Closed

A way to stop the integrated terminal from launching at startup #147192

CrendKing opened this issue Apr 11, 2022 · 9 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label
Milestone

Comments

@CrendKing
Copy link

VSCode version: 1.65.2

I use VSCode to develop Rust project. If I run a build task (such as cargo build), it runs in the integrated terminal. If I close VSCode without closing that terminal session, next time I open the same workspace, the integrated terminal will launch at startup. The problem is that it launches with the default profile (with same "pwsh"), which is not reused by the build tasks. Therefore, that session is wasted and stays forever unless I manually close it.

I tested this is not a behavior introduced by any extension. I also tried every existing setting I can find. Nothing (such as terminal.integrated.enablePersistentSessions) works. Also, if I go to delete the workspace state file from data\user-data\User\workspaceStorage<random_string>, the terminal no longer opens, so I think it's from VSCode. Internet shows various way to auto launch terminal at startup, but I need the exact opposite.

Screenshot: The "pwsh" is the auto launched one. The second is the build task I launch.
Clipboard 1

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal General terminal issues that don't fall under another label labels Apr 13, 2022
@pcjmfranken
Copy link

pcjmfranken commented Apr 17, 2022

You sure you're unable to reproduce this with all extensions disabled?

I've had exactly this happen before and it took me a while to figure out.

Turned out that the language's official extension picked up on build commands I ran through the integrated terminal, and then tried to be helpful by "hijacking" my invocation and running its own VSCode Task instead (which was configured to open a terminal window).

Edit: And that's suspiciously similar to what the official Rust extension says it does 😉

@CrendKing
Copy link
Author

This is 100% reproducible with all my installed extensions disabled. It has nothing to do with Rust (I don't have Rust extension). All you need to do is:

  1. Create a new directory.
  2. Open the directory with VSCode.
  3. Open the integrated terminal.
  4. Exit VSCode.
  5. Open the directory with VSCode again.

I don't want that terminal be opened at startup.

@pcjmfranken
Copy link

Thanks for confirming, was

Just recalled there's another setting involving this weird session revival behaviour:

  "terminal.integrated.persistentSessionReviveProcess": "never",
  "terminal.integrated.enablePersistentSessions": false,

To Microsoft: Please kill this feature with fire, or at least disable it by default. The reanimated sessions are unpredictable, confusing, and often lead to conflicts and crashes.

@CrendKing
Copy link
Author

You are exactly correct sir! The combination of the two did it. Feel free to close this.

@CrendKing
Copy link
Author

CrendKing commented Apr 17, 2022

Wait. I tried again, and it's no longer working. Was I hallucinating? I even went to clear the workspaceStorage directory and no.

Also, if persistent session is already disabled by terminal.integrated.enablePersistentSessions, why would terminal.integrated.persistentSessionReviveProcess still needed? I'm not sure if this revival thing is linked to persistent sessions, since the terminal is fresh new every time.

@meganrogge meganrogge added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels May 2, 2022
@vscodenpa
Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@ibehnam
Copy link

ibehnam commented Dec 8, 2022

This is really annoying. Please disable this "feature". VSC is already bloated and slower than some non-Electron IDEs. This weird behavior only makes it worse. There's no reason that terminal cannot start in the background.

@Tyriar
Copy link
Member

Tyriar commented Dec 12, 2022

/duplicate #39137

@Tyriar Tyriar closed this as completed Dec 12, 2022
@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

7 participants
@CrendKing @Tyriar @pcjmfranken @meganrogge @ibehnam @vscodenpa and others