Skip to content

Auto-env activation provides a poor out-of-the-box experience with PS1 (KeyboardInterrupt race) #1127

@Mattwmaster58

Description

@Mattwmaster58

It was briefly mentioned here: #1011, but I don't think it's fixed, only a workaround was provided.

To summarize, with auto-env activation + running from the top right corner there's a race condition: if your python script doesn't get done in about a half second, (presumably) this extension KeyboardInterrupts to run the PS1 activation script. Here's what it looks like:

WindowsSandboxRemoteSession_AZXCAznRcA.mp4

There was a workaround provided was to set a config value, but I think the UX should be better than that. Especially because the issue (for me) was racey. So for the first however many months, I just ran the script again and hoped that it wouldn't happen this time. Actually come to think of it was probably re-using the activated terminal avoiding the need to run the activation script.

I assume there's something from us setting the default "python-envs.terminal.autoActivationType" to "shellStartup" (which avoids this issue)?

Metadata

Metadata

Assignees

Labels

area-activationIssue related to activation. Root cause can be from interpreter selection or activation in terminalarea-terminalEnvironment extension specific terminal issues.bugIssue identified by VS Code Team member as probable bugduplicateThis issue or pull request already exists

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions