Anti-Distinctlyminty
Anti-Distinctlyminty

Reputation: 2775

Can Someone Please Clarify Where .env Files Work in VS Code

The documentation for the Python extension for VS Code says that it supports environment variables being set in a .env file. I've read the documentation and various reports on GitHub, but I have not found any clarity on a few things:

  1. Do .env files work with tasks? My experience says they don't.
  2. Do .env files work with the integrated terminal? My experience says they don't.

Upvotes: 0

Views: 361

Answers (1)

Brett Cannon
Brett Cannon

Reputation: 16090

.env files are a construct of the Python extension and so do not work in places that VS Code directly controls (e.g. tasks and the terminal). A lot of people use them with the debugger.

Upvotes: 1

Related Questions