Skip to content

shellStartup doesn't work properly in a devcontainer #986

@renan-r-santos

Description

@renan-r-santos

I have found an interesting bug. You can reproduce it by opening the MRE below in VSCode, then reopening it in a devcontainer, and then opening the workspace configuration provided.

All terminals, Python debugging, etc., will select the Python environment of the last Python file you have opened in the editor. If you don't open any files, you'll see all terminals, even the ones that should activate proj2 will activate proj1 instead. The intriguing part is that this happens only in a devcontainer and only when using shellStartup. Outside of it is fine.

I've checked the trace logs, and it seems that createProcess over here has the correct env vars set in shellLaunchConfig but has the wrong ones in env and those are overwriting the ones passed by the Python Environments extension.

reproducer.zip

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtriage-needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions