'Precedence of setting environment variables
I'm trying to set env variables to my python project in vscode. This is quote from official doc for setting experiment variables:
Note: When environment variables are specified using multiple methods, be aware that there is an order of precedence. Environment variables contained in the .env file specified by the python.envFile setting (user or workspace) will override variables defined in the envFile specified in launch.json, as well as any env variables defined in the launch.json file itself. Similarly, environment variables defined in the envFile specified in launch.json will override env variables defined in the launch.json file.
However according to my experience, the precedence of the above mentioned three methods are just the opposite: env variables defined in launch.json can overide those defined in .env files specified by python.envFile. I personally think the behaviour observed in practice makes more sense.
That is really confusing to me, so is that a typo in doc or did I miss some details?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
