-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Type: Bug
Behaviour
Running a terminal with both ms-python.python and ms-python.debugpy extensions contributing to the terminal environment has conflicts - i.e. cannot run debugpy becuase it's not in the path if it is not the last environment override (therefore there may be some randomness for reproducing depending on the order of these overrides).
Steps to reproduce:
- Open a project with a venv
- Ensure both the ms-python.python and ms-python.debugpy extensions are present
- Ensure
python.terminal.shellIntegration.enabled
is true - Open / restart the terminal
- Start a Python shell. I expect the option to open in Native REPL to be there, but it is not
- Type
debugpy
.It may not be in the path despite the message from the terminal stating you can run it
Diagnostic data
Below is the changes to the terminal environment reported by VS Code. The ms-python.python and ms-python.debugpy overwrite each other. The $PATH variable will depend on the order of the changes, which is not configurable.
Terminal Environment Changes
Extension: ms-python.debugpy
Enables use of no-config debugging, debugpy <script.py>
, in the terminal.
PYDEVD_DISABLE_FILE_VALIDATION=1
DEBUGPY_ADAPTER_ENDPOINTS=~/.vscode/extensions/ms-python.debugpy-2025.0.1-linux-x64/.noConfigDebugAdapterEndpoints/endpoint-d65bbbc3e1313e05.txt
PATH=${env:PATH}:~/.vscode/extensions/ms-python.debugpy-2025.0.1-linux-x64/bundled/scripts/noConfigScripts
BUNDLED_DEBUGPY_PATH=~/.vscode/extensions/ms-python.debugpy-2025.0.1-linux-x64/bundled/libs/debugpy
Extension: vscode.git
Enables the following features: git auth provider
GIT_ASKPASS=/usr/share/code/resources/app/extensions/git/dist/askpass.sh
VSCODE_GIT_ASKPASS_NODE=/usr/share/code/code
VSCODE_GIT_ASKPASS_EXTRA_ARGS=
VSCODE_GIT_ASKPASS_MAIN=/usr/share/code/resources/app/extensions/git/dist/askpass-main.js
VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-9811775006.sock
Extension: ms-python.python
Activated environment for ./.venv/bin/python3.11
VIRTUAL_ENV=~/dev/python/xxx/.venv
VIRTUAL_ENV_PROMPT=project-xxxx
PS1=project-xxx${env:PS1}
PATH=~/.vscode/extensions/ms-python.python-2025.0.0-linux-x64/python_files/deactivate/bash:~/dev/python/xxx/.venv/bin:${env:PATH}
Extension version: 2025.0.0
VS Code version: Code 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z)
OS version: Linux x64 6.8.0-54-generic
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.3
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
- Value of the
python.languageServer
setting: Default
User Settings
languageServer: "Pylance"
testing
• cwd: "<placeholder>"
terminal
• executeInFileDir: "<placeholder>"
Installed Extensions
Extension Name | Extension Id | Version |
---|---|---|
atlascode | atl | 3.4.11 |
black-formatter | ms- | 2024.6.0 |
debugpy | ms- | 2025.0.1 |
flake8 | ms- | 2024.0.0 |
gitlens | eam | 16.3.2 |
isort | ms- | 2023.10.1 |
js-debug | ms- | 1.97.1 |
js-debug-companion | ms- | 1.1.3 |
json | Zai | 2.0.2 |
jupyter | ms- | 2025.1.0 |
jupyter-keymap | ms- | 1.1.2 |
jupyter-renderers | ms- | 1.1.0 |
metals | sca | 1.47.0 |
prettify-json | moh | 0.0.3 |
python | ms- | 2025.0.0 |
rainbow-csv | mec | 3.17.0 |
scala | sca | 0.5.9 |
vscode-js-profile-table | ms- | 1.0.10 |
vscode-jupyter-cell-tags | ms- | 0.1.9 |
vscode-jupyter-powertoys | ms- | 0.1.1 |
vscode-jupyter-slideshow | ms- | 0.1.6 |
vscode-pull-request-github | Git | 0.104.1 |
vscode-pylance | ms- | 2025.2.1 |
vscode-python-envs | ms- | 0.3.10441011 |
vscode-yaml | red | 1.16.0 |
System Info
Item | Value |
---|---|
CPUs | Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz (8 x 2699) |
GPU Status | 2d_canvas: unavailable_software canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: disabled_software multiple_raster_threads: enabled_on opengl: disabled_off rasterization: disabled_software raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: disabled_software video_encode: disabled_software vulkan: disabled_off webgl: unavailable_software webgl2: unavailable_software webgpu: disabled_off webnn: unavailable_software |
Load (avg) | 1, 2, 3 |
Memory (System) | 31.27GB (20.15GB free) |
Process Argv | --enable-features=UseOzonePlatform --ozone-platform-hint=auto --crash-reporter-id 20fd7479-ebfb-4125-a5b9-647abc6667e7 |
Screen Reader | no |
VM | 0% |
DESKTOP_SESSION | ubuntu-wayland |
XDG_CURRENT_DESKTOP | Unity |
XDG_SESSION_DESKTOP | ubuntu-wayland |
XDG_SESSION_TYPE | wayland |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551:31249599
vscod805:30301674
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31192216
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
8did9651:31230678
9064b325:31222308
copilot_t_ci:31222730
jda6j935:31233686
copilothoveron:31248524