Skip to content

PYTHONSTARTUP is set even if the shell integration setting is off #25485

@WardBrian

Description

@WardBrian

Type: Bug

Behaviour

I noticed earlier today that my python shell was behaving strangely. I have narrowed it down to the fact that my custom PYTHONSTARTUP was being nuked by this extension. I have disabled both the python.terminal.shellIntegration.enabled and the overarching terminal.integrated.shellIntegration.enabled setting, and yet it is still being set to PYTHONSTARTUP=/home/brian/.config/Code/User/workspaceStorage/35fff5972bee4bfdc8e3450cd43f75b8/ms-python.python/pythonrc.py

Steps to reproduce:

  1. Disable these settings
  2. printenv | grep PYTHON, observe that PYTHONSTARTUP is still being modified

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2025-09-25 15:18:40.390 [warning] Dir "/home/brian/Dev/cpp/tinystan/.pixi/envs" is not watchable (directory does not exist)
2025-09-25 15:18:40.390 [info] Skipping ActivatedEnv Detection:  process.env.VSCODE_CLI !== '1'
2025-09-25 15:18:40.404 [info] > conda info --json
2025-09-25 15:18:40.420 [info] > pyenv which python
2025-09-25 15:18:40.420 [info] cwd: .
2025-09-25 15:18:40.971 [info] > ~/.miniforge3/envs/bridgestan/bin/python -I ~/.vscode/extensions/ms-python.python-2025.14.0-linux-x64/python_files/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2025.14.0-linux-x64/python_files/interpreterInfo.py
2025-09-25 15:18:41.004 [info] Python interpreter path: ~/.miniforge3/envs/bridgestan/bin/python
2025-09-25 15:18:41.007 [info] Using interpreter path: /home/brian/.miniforge3/envs/bridgestan/bin/python
2025-09-25 15:18:41.504 [info] Using direct conda activate command: conda activate bridgestan
2025-09-25 15:18:43.331 [info] Starting Pylance language server.

Extension version: 2025.14.0
VS Code version: Code 1.104.1 (0f0d87fa9e96c856c5212fc86db137ac0d783365, 2025-09-17T23:36:24.973Z)
OS version: Linux x64 6.8.0-84-generic
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.0
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
User Settings


condaPath: "<placeholder>"

languageServer: "Pylance"

experiments
• enabled: false

Installed Extensions
Extension Name Extension Id Version
anycode ms- 0.0.75
anycode-c-sharp ms- 0.0.8
anycode-cpp ms- 0.0.7
anycode-go ms- 0.0.8
anycode-java ms- 0.0.8
anycode-kotlin ms- 0.0.8
anycode-php ms- 0.0.8
anycode-python ms- 0.0.7
anycode-rust ms- 0.0.8
anycode-typescript ms- 0.0.7
autodocstring njp 0.6.1
black-formatter ms- 2025.2.0
cmake twx 0.0.17
copilot Git 1.372.0
copilot-chat Git 0.31.2
cpptools ms- 1.27.7
debugpy ms- 2025.10.0
even-better-toml tam 0.21.2
git-graph mhu 1.30.0
isort ms- 2025.0.0
jenkins-pipeline-linter-connector jan 1.2.0
js-debug ms- 1.104.0
js-debug-companion ms- 1.1.3
jupyter ms- 2025.8.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.3.0
language-julia jul 1.149.2
language-x86-64-assembly 13x 3.1.5
latex-workshop Jam 10.10.2
linter-gfortran for 3.2.0
Lisp mat 0.1.12
LiveServer rit 5.7.9
material-theme zhu 3.19.0
mesonbuild mes 1.27.0
mypy-type-checker ms- 2025.2.0
ocaml-platform oca 1.32.3
pdf tom 1.2.2
prettier-vscode esb 11.0.0
project-manager ale 12.8.0
python ms- 2025.14.0
python-snippets cst 0.1.2
quarto qua 1.124.0
rainbow-csv mec 3.22.0
remote-containers ms- 0.427.0
remote-explorer ms- 0.6.2025081809
remote-server ms- 1.5.3
remote-ssh ms- 0.121.2025081515
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.104.2
rust-analyzer rus 0.3.2593
shellcheck tim 0.38.3
simple-rst tro 1.5.4
todo-tree Gru 0.0.226
vscode-ansi ili 1.1.7
vscode-clangd llv 0.2.0
vscode-dash dee 2.4.0
vscode-firefox-debug fir 2.15.0
vscode-github-actions git 0.27.2
vscode-js-profile-table ms- 1.0.10
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
vscode-ocaml-expect-inline rel 0.7.2
vscode-pylance ms- 2025.8.2
vscode-python-envs ms- 1.8.0
vscode-remote-extensionpack ms- 0.26.0
vscode-stan-extension war 3.0.0
vscode-table-formatter shu 1.2.1
wasm-dwarf-debugging ms- 1.0.1
System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 3316)
GPU Status 2d_canvas: enabled
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
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 1, 1, 1
Memory (System) 30.93GB (23.38GB free)
Process Argv
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE wayland

Metadata

Metadata

Assignees

Labels

area-replbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions