Inline Diagnostics
ENV Manager Pro scans your source files for environment variable references and flags any that don't exist in your active .env file.
How It Works
When you open or edit any source file, the extension checks every process.env.KEY, import.meta.env.KEY (Vite/Astro), and Python os.environ['KEY'] / os.getenv('KEY') reference against the known keys in your .env files.
Missing keys are reported as warnings in the Problems panel (source: ENV Manager, code: missing-env-key).
Example
If your code has:
const db = new Client(process.env.DATABASE_URL);
const secret = process.env.JWT_SECRET;
And your .env file contains DATABASE_URL but not JWT_SECRET, you'll see a yellow squiggly under JWT_SECRET with the message:
ENV Manager: JWT_SECRET is not defined in any .env file
Supported Patterns
| Pattern | Language |
|---|---|
process.env.KEY | JavaScript, TypeScript |
import.meta.env.KEY | Vite, Astro, SvelteKit |
os.environ['KEY'] | Python |
os.getenv('KEY') | Python |
Built-in Exclusions
Common built-in variables are excluded from diagnostics to avoid false positives:
NODE_ENV, PATH, HOME, CI, GITHUB_ACTIONS, VERCEL, NETLIFY, PORT, HOST, PWD, TERM, SHELL, USER, TMPDIR, LANG, TZ
Refreshing Diagnostics
Diagnostics refresh automatically when:
- You open a source file
- You edit a source file
- Any
.env*file in the workspace changes
You can also add a key to suppress its diagnostic — see Quick Fix.