2025-07-17 11:03:27.553 [info] Experiment 'pythonTestAdapter' is inactive
2025-07-17 11:03:27.553 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2025-07-17 11:03:27.553 [info] Native locator: Refresh started
2025-07-17 11:03:27.559 [info] Poetry environment manager found at: C:\Users\RobertHowlett\AppData\Roaming\Python\Python312\Scripts\poetry.exe
2025-07-17 11:03:27.626 [info] Native locator: Refresh finished in 122 ms
2025-07-17 11:03:27.628 [info] Python interpreter path: .\laughingowl\.venv\Scripts\python.exe
2025-07-17 11:03:27.672 [info] > pyenv which python
2025-07-17 11:03:27.672 [info] cwd: .
2025-07-17 11:03:28.735 [info] > . ./laughingowl/.venv/Scripts/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2025.10.0-win32-x64/python_files/printEnvVariables.py
2025-07-17 11:03:28.736 [info] shell: bash
2025-07-17 11:03:28.949 [info] > C:\Program Files\Python312\python.exe ~/.vscode/extensions/ms-python.python-2025.10.0-win32-x64/python_files/printEnvVariables.py
2025-07-17 11:03:28.949 [info] shell: bash
2025-07-17 11:03:29.017 [info] Setting environment variable EXEPATH in collection to C:\Users\RobertHowlett\AppData\Local\Programs\Git\bin {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Setting environment variable HOME in collection to C:\Users\RobertHowlett {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Setting environment variable MSYSTEM in collection to MINGW64 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Prepending environment variable PATH in collection to c:\Users\RobertHowlett\.vscode\extensions\ms-python.python-2025.10.0-win32-x64\python_files\deactivate\bash;C:\Projects\oaas-elephantbird\laughingowl\.venv\Scripts;C:\Users\RobertHowlett\AppData\Local\Programs\Git\mingw64\bin;C:\Users\RobertHowlett\AppData\Local\Programs\Git\usr\bin;C:\Users\RobertHowlett\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\PuTTY;C:\Users\RobertHowlett\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Python312;C:\Program Files\Python312\Scripts;C:\Users\RobertHowlett\AppData\Local\Microsoft\WindowsApps;C:\Users\RobertHowlett\AppData\Roaming\Python\Python312\Scripts;C:\Users\RobertHowlett\AppData\Local\Microsoft\WinGet\Packages\jqlang.jq_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\RobertHowlett\AppData\Local\Programs\Git\cmd; {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Setting environment variable PLINK_PROTOCOL in collection to ssh {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Prepending environment variable PS1 in collection with (laughingowl) {"applyAtShellIntegration":true,"applyAtProcessCreation":false}
2025-07-17 11:03:29.017 [info] Setting environment variable PYTHONIOENCODING in collection to utf-8 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Setting environment variable PYTHONUNBUFFERED in collection to 1 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Setting environment variable TERM in collection to xterm-256color {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.017 [info] Setting environment variable VIRTUAL_ENV in collection to C:/Projects/oaas-elephantbird/laughingowl/.venv {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.018 [info] Setting environment variable VIRTUAL_ENV_PROMPT in collection to laughingowl {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2025-07-17 11:03:29.018 [info] Send text to terminal: "C:/Program Files/Python312/python.exe" c:\Users\RobertHowlett\.vscode\extensions\ms-python.python-2025.10.0-win32-x64\python_files\printEnvVariablesToFile.py c:\Users\RobertHowlett\.vscode\extensions\ms-python.python-2025.10.0-win32-x64\python_files\deactivate\bash\envVars.txt
2025-07-17 11:03:30.469 [info] Starting Pylance language server.
2025-07-17 11:03:59.027 [error] Failed to initialize deactivate script C:\Users\RobertHowlett\AppData\Local\Programs\Git\bin\bash.exe [Error: "c:\Users\RobertHowlett\.vscode\extensions\ms-python.python-2025.10.0-win32-x64\python_files\deactivate\bash\envVars.txt" file not created
at Timeout.<anonymous> (c:\Users\RobertHowlett\.vscode\extensions\ms-python.python-2025.10.0-win32-x64\out\client\extension.js:2:336746)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7)]
Type: Bug
Behaviour
When this extension is enabled, when I start a new terminal
subfolder/.venv/Scriptsis not on the pathSteps to reproduce:
python.terminal.activateEnvInCurrentTerminalandpython.terminal.activateEnvironmentenabledsubfolder/.venv, such that a python executable is atsubfolder/.venv/Scripts/pythonPython: select interpreterselectsubfolder/.venv/Scripts/pythonwhich pythonExpected behaviour: it returns
<project_path>/subfolder/.venv/Scripts/pythonActual behaviour: it returns the system Python (in my case
/c/Program Files/Python312/python)The problem is resolved by disabling Python Debugger and restarting extensions + the terminal. I have reproduced on my colleagues' machines, which have very similar setups. Scanning $PATH shows that
<project_path>/subfolder/.venv/Scriptsis not on the path.Diagnostic data
launch.jsonconfigurationNo such file exists
Output for
Pythonin theOutputpanel (When Python Debugger is enabled)Output for
Python Debuggerin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython Debugger)This is empty
System information
Extension version: 2025.10.0
VS Code version: Code 1.102.1 (7adae6a56e34cb64d08899664b814cf620465925, 2025-07-15T16:41:17.147Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Details
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments