Skip to content

.env File no longer updates commented variables #936

Closed

Description

@solman252

On the previous release, commenting out a variable in the .env file would prompt the user to reload the terminal and reinject from .env,
but now, commenting out a variable doesn't prompt, nor will the variable update the next time the user is prompted for another change.

Activity

  1. eleanorjboyd commented on Oct 13, 2025

    @eleanorjboyd
    Contributor

    To confirm you have the setting "python.useEnvFile" set to true right?

  2. solman252 commented on Oct 13, 2025

    @solman252
    Author

    Correct,
    in my .vscode/settings.json:

    {
    "python.terminal.useEnvFile": true,
    "python.envFile": "${workspaceFolder}/.env"
    }

  3. eleanorjboyd commented on Oct 14, 2025

    @eleanorjboyd
    Contributor

    what do you have for terminal.integrated.shellIntegration.enabled? Wondering if Anthony Kim (@anthonykim1) would have any ideas either

  4. solman252 commented on Oct 14, 2025

    @solman252
    Author

    Doesn't show under either my workspace or user settings.json, but in the UI settings it shows as enabled.

  5. anthonykim1 commented on Oct 14, 2025

    @anthonykim1
    Contributor

    I dont remember us supporting

    On the previous release, commenting out a variable in the .env file would prompt the user to reload the terminal and reinject from .env

  6. solman252 commented on Oct 14, 2025

    @solman252
    Author

    Supporting commented vars? I assure you, there is support for that in both the current and previous releases.

    I've attatched a video showcasing the previous behavior in v1.8.0, and the problematic behavior in v1.10.0.
    (I had to zip it because you can't attach videos directly on Github, plus I also attatched the workspace folder)

    I forgot to showcase it in the video, but closing the terminal and reopening it manually also does not fix the issue, and the environment variable seems to be cached.

    Environment Test.zip

  7. added
    area-terminalEnvironment extension specific terminal issues.
    importantIssue identified as high-priority
    and removed
    importantIssue identified as high-priority
    on Feb 3, 2026
  8. locked as resolved and limited conversation to collaborators on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalEnvironment extension specific terminal issues.bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions