Skip to content

"Python" (ms-python.python) #25345

@flor187

Description

@flor187

Type: Bug

Behaviour

Subject: "Python: Run Selection/Line in Python Terminal" not working after 2025-07-29 update

Description of the issue:
I am experiencing an issue where the command "Python: Run Selection/Line in Python Terminal" (triggered by Shift+Enter or via the Command Palette) no longer functions. When attempting to use this feature, no new terminal opens, and the selected code is not executed.

Expected behavior:
When using "Python: Run Selection/Line in Python Terminal", a new integrated terminal should open (or an existing one should be used) to execute the selected line or block of Python code, with the active Conda environment correctly initialized.

Observed behavior:
Upon executing the command, nothing visibly happens in the VS Code UI (no new terminal appears, no code execution). The problem does not occur when running the entire Python script, which executes correctly in the integrated terminal using my Conda environment. Interactive execution in the "Python Interactive Window" also works as expected (after ensuring ipykernel is installed). This issue is specific to the "Run Selection/Line in Python Terminal" functionality.

Output from "Output" panel (Python section) when trying to run selection:
(Note: The timestamp and exact path may vary, but the core message structure is consistent.)

Troubleshooting steps already attempted:
I have thoroughly troubleshooted this issue, including:

  1. Ensuring conda init powershell was run and verified.
  2. Checking and setting Set-ExecutionPolicy RemoteSigned -Scope CurrentUser for PowerShell.
  3. Confirming the correct Conda environment (avert_py310 with Python 3.10) is selected in VS Code.
  4. Installing ipykernel in the active Conda environment.
  5. Cleaning Conda cache (conda clean --all).
  6. Verifying and removing old Python 3.8-related certifi paths from system/user environment variables (REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, SSL_CERT_FILE).
  7. Reinstalling certifi and requests within the Conda environment.
  8. Completely uninstalling and reinstalling VS Code and all extensions (including Python extension).
  9. Reinstalling the Python extension from Microsoft.
  10. Verifying python.terminal.activateEnvironment is true.
  11. Verifying terminal.integrated.defaultProfile.windows is PowerShell.
  12. Checking launch.json console setting (integratedTerminal).
  13. My Conda environments are the only Python installations on the system now (old Python 3.8 standalone was uninstalled).

Environment details:

  • VS Code Version: [Inserează aici versiunea ta de VS Code, de ex. 1.90.2]
  • Python Extension Version: 2025.10.1 (Last Released: 2025-07-29, 13:50:02)
  • Python Version (in Conda environment): Python 3.10
  • Conda/Miniconda Version: [Inserează aici versiunea ta de Conda, de ex. 25.3.1 - o găsești în outputul erorii anterioare sau rulând conda --version]
  • Operating System: Windows 10/11 (Specifică-ți versiunea exactă, de ex., Windows 11 Pro 23H2)

Thank you for your time and assistance!

Extension version: 2025.10.1
VS Code version: Code 1.102.3 (488a1f239235055e34e673291fb8d8c810886f81, 2025-07-29T03:00:23.339Z)
OS version: Windows_NT x64 10.0.26100
Modes:

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


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
debugpy ms- 2025.10.0
js-debug ms- 1.102.0
js-debug-companion ms- 1.1.3
jupyter ms- 2025.6.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.3.0
python ms- 2025.10.1
vsc-python-indent Kev 1.21.0
vscode-js-profile-table ms- 1.0.10
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
vscode-pylance ms- 2025.7.1
vscode-python-envs ms- 1.2.0
System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-1255U (12 x 2611)
GPU Status 2d_canvas: enabled
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
Load (avg) undefined
Memory (System) 15.70GB (3.94GB free)
Process Argv --crash-reporter-id 26808c81-652b-4e7b-aefd-42b468b714c0
Screen Reader no
VM 50%
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
2e7ec940:31000449
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
hdaa2157:31222309
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
9d2cg352:31346308
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31350858
4f60g487:31327383
nes-diff-11:31337487
replacestringexc:31350595
nes-set-on:31351930
6abeh943:31336334
envsactivate1:31353494
yijiwantestdri0626-t:31336930
0927b901:31350571
ji9b5146:31348712
8gib2676:31356126
0cj2b977:31352657

Metadata

Metadata

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions