Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Env Variable PreviewNew to Visual Studio Code? Get it now.
Env Variable Preview

Env Variable Preview

simonhe

|
20 installs
| (0) | Free
| Sponsor
Instantly preview .env file variable values on hover in VS Code. Supports multiple .env files and provides quick edit/copy actions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Env Preview Logo

Env Preview for VS Code

VS Code Marketplace Version VS Code Marketplace Downloads License

English | 简体中文

Effortlessly preview environment variable values directly within your VS Code editor. Hover over an environment variable in your code to see its value from different .env files.

✨ Features

  • Instant Preview: Hover over an environment variable (e.g., process.env.API_KEY or import.meta.env.VITE_USER) to see its value.
  • Multi-File Support: Displays values from various .env files (e.g., .env, .env.development, .env.production).
  • Quick Actions:
    • Edit: Directly jump to the variable definition in the corresponding .env file.
    • Copy: Quickly copy the variable's value.
  • Clear Identification: Easily distinguish between different environment configurations (e.g., development, staging, production).

🚀 Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
  3. Search for Env Preview.
  4. Click Install.

Or, install via the VS Code Marketplace.

💡 Usage

Once installed, simply open a project with .env files and hover your mouse cursor over an environment variable in your code (e.g., in a JavaScript, TypeScript, or other supported file types). A tooltip will appear showing the values from your configured .env files.

🙏 Sponsors

Support this project by becoming a sponsor. Your name will appear here and on my GitHub profile.

You can also buy me a cup of coffee.

📄 License

MIT © Simon He

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft