Description
I defined an environment variable with a trailing comment in my .env file.
FOO=bar # trailing comment
When debugging the following python module.
import os
foo = os.getenv("FOO")
print(foo)
foo gets value bar # trailing comment, the expected behaviour is foo has value bar.
Version
I am using MacOS and I have the following extensions:
Name: Python Environments
Id: ms-python.vscode-python-envs
Description: Provides a unified python environment experience
Version: 1.12.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs
Name: Python Debugger
Id: ms-python.debugpy
Description: Python Debugger extension using debugpy.
Version: 2025.16.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy