Skip to content

Feature request: option to re-enable traditional virtual environment activation for terminal identifier #22611

Open
@Nevrai

Description

@Nevrai

Issue Description

Recent updates to the Visual Studio Code Python extension (25 October) have changed how the activation of virtual environments is handled in the terminal. While the environments are indeed activated, the traditional visual indicator (e.g., (.venv)) is no longer displayed in the terminal prompt. This change, whilst addressing certain technical limitations, has impacted the user experience by removing a clear and immediate visual confirmation of the active environment.

Suggested feature

I propose introducing a setting in the Python extension that allows user to choose between the new implicit activation method, which uses the new VSCode API, and the traditional method of automatically running activate or .\venv-name\Scripts\Activate.ps1. While there are benefits to using this new VSCode API method, I personally much prefer seeing the name of the virtual environment in the terminal, as it provides a constant confirmation that your venv is activated and when it’s not. It also makes it much easier to work on different projects with different virtual environments simultaneously.

An option in the Python extension settings to return to the old activation method, if feasible, would be a very welcome addition, as it would restore the visual venv indicator in the terminal. Alternatively, if it would be possible to implement a different type of visual indicator displaying the name of the currently activated vend in the terminal, that would also be fantastic.

Rationale

The primary reason for this request is the clarity and assurance that comes with the visual indicator. Many developers, including myself, find it incredibly useful to have immediate visual feedback confirming which environment is active or whether one is active in the first place, especially when working with multiple projects or environments.

Additional context

From my understanding, based on the discussion in issue #11039 on the Python extension’s GitHub repository, this change was made to overcome certain technical challenges. Whilst the rationale is understandable, providing users with the flexibility to choose their preferred method could greatly enhance the user experience without compromising the extension’s functionality, provided this is a feasible and possible feature to implement to the extension.

Thank you for considering this feature request. The Python extension is a vital tool for every Python developer using VSCode, and enhancements like this could significantly improve the development workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-environmentsFeatures relating to handling interpreter environmentscommunity askFeature request that the community expressed interest infeature-requestRequest for new features or functionalityneeds proposalNeed to make some design decisions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions