-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Open a new terminal when extension gets activated #5330
Comments
Suggestion
|
@DonJayamanne just to be clear this is my experience:
My workaround is to:
My understanding is that if the suggestion would also require that the initial terminal be closed? |
Don't know yet. There are other scenarios we'll need to consider. But for now, I do agree with the problem and we have a similar if not related issue #4581 |
Is this bug is going to be fixed soon, or should I consider creating a pull request myself? |
Hi @popzxc, happy to hear you're considering to create a PR :) this issue is tagged with "needs spec" because we first need to design the solutions for this, since we need to consider multiple scenarios (for example, like Don said, we can't just close the first terminal and open a new one because the first terminal may be being used) |
Well, it's indeed quite difficult to find a generic solution that will suit everyone's needs. E.g., add a boolean value if (pythonSettings.activateCurrentTerminal && vscode.window.activeTerminal) {
terminalActivator.activateEnvironmentInTerminal(vscode.window.activeTerminal, undefined, true);
} So, it will be fully backward-compatible, and those who will consider current approach not convenient, will be able to get what they want. |
This seems like a good middle ground approach, after some testing/feedback, we could consider in the future prompting users if they would like to automatically create a new terminal when the python interpreter changes. |
@popzxc can you clarify if your PR creates a new terminal as soon as the python interpreter changes? Or just on first launch? I would avoid trashing the existing one, since users may have state in the existing one that they don't want to lose accidentally. I think the setting name can be updated to better reflect what the feature does. |
@qubitron It doesn't open a new terminal actually, it's indeed activates the currently used terminal (and I think it's reflected in the setting name). So, with this setting enabled, currently used terminal is not trashed, but just gets activated, so user can continue working in it with all the state saved. |
Validated 👍 |
As already acknowledged above, the implementation in #7665 doesn't cover all the cases:
[In the case of the first one, it is effectively a bug for which we have provided a workaround ("change the setting to Should we open new issues for the remaining cases? |
Thanks @ericsnowcurrently, that's a very good point. I created #8907 to track the spec for the remaining cases. |
Environment data
Expected behavior
C:/Users/anders.swanson/AppData/Local/Continuum/miniconda3/Scripts/activate
which should runactivate azure_automl
Actual behaviour
terminal stalls likes this for minutes and never changes.
my workaround is to trash the terminal window and open a new one. expected behavior and terminal is ready for prompts within 2 seconds.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: