forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Type: Bug
Behaviour
ms-python extension is injecting old prod env vars into node dev server via VSCODE_ENV_REPLACE. This is overriding the dev config in nextjs web app.
Steps to reproduce:
- Start nextjs dev server with
pnpm run dev - Print env:
console.log('NODE_ENV', process.env.NODE_ENV)- returns correctNODE_ENV: 'development'console.log('process.env', process.env)- returns correct dev env config, butVSCODE_ENV_REPLACEcontains old prod config which is overriding everything else
- Applications exhibits prod behavior
- Disable ms-python extension
- Restart cursor IDE
- Run
pnpm run devin new terminal instance - Print env:
console.log('process.env', process.env)- returns correct dev .env config andVSCODE_ENV_REPLACEis abscent.
- Application exhibits dev behavior
- Re-enable ms-python extension without restarting terminal
- Observed old env vars trying to be injected when viewing "Show environment contributions" tab. (env vars haven't been included for obvious reasons):
Extension version: 2025.6.1
VS Code version: Cursor 1.1.6 (5b19bac7a947f54e4caa3eb7e4c5fbf832389850, 2025-06-25T02:14:24.784Z)
OS version: Darwin arm64 24.5.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.9
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Pyenv
- Value of the `python.languageServer` setting: Pylance
<details>
<summary>User Settings</summary>
<p>
languageServer: "Pylance"
</p>
</details>
<details>
<summary>Installed Extensions</summary>
|Extension Name|Extension Id|Version|
|---|---|---|
|cursor-always-local|any|0.0.1|
|cursor-deeplink|any|0.0.1|
|cursor-retrieval|any|0.0.1|
|cursor-shadow-workspace|any|1.0.0|
|cursor-themes|und|0.0.2|
|cursor-tokenize|any|0.0.1|
|debugpy|ms-|2025.6.0|
|intellij-idea-keybindings|k--|1.7.4|
|js-debug|ms-|1.93.0|
|js-debug-companion|ms-|1.1.3|
|jupyter-keymap|ms-|1.0.0|
|markdown-all-in-one|yzh|3.6.3|
|markdown-preview-enhanced|shd|0.8.18|
|playwright|ms-|1.1.15|
|python|ms-|2025.6.1|
|rest-client|hum|0.26.0|
|terraform|has|2.34.5|
|vscode-django|bat|1.15.0|
|vscode-dotnet-runtime|ms-|2.3.2|
|vscode-github-actions|git|0.27.2|
|vscode-jest|Ort|6.4.3|
|vscode-jest-runner|fir|0.4.82|
|vscode-js-profile-table|ms-|1.0.9|
|vscode-pylance|ms-|2024.8.1|
|vscode-stripe|str|3.8.6|
</details>
<details>
<summary>System Info</summary>
|Item|Value|
|---|---|
|CPUs|Apple M1 Pro (10 x 2400)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|3, 3, 4|
|Memory (System)|16.00GB (0.07GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details>
<!-- generated by issue reporter -->
MauritsDescampsjaychoww
