Repository navigation
python.execSelectionInTerminal not working in 2025.20.1 #25694
Description
Type: Bug
Behaviour
shift + enter command used for python.execSelectionInTerminal will open a python terminal, but not send the code
No error is printed out, nothing happens except opening the python terminal.
Used "Developer: Toggle Keyboard Shortcuts Troubleshooting" to confirm that
the command "python.execSelectionInTerminal" was being triggered to confirm it is not an issue with an overlapping keyboard shortcut. Output: 2025-12-22 09:43:15.057 [info] [Window] [KeybindingService]: + Invoking command python.execSelectionInTerminal.
I was able to get the functionality of shift+enter running the command back after switching to 2025.20.0
Steps to reproduce:
- Have python extension version 2025.20.1 installed
- Hit shift + enter on a line of code
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Extension version: 2025.20.0
VS Code version: Code 1.107.1 (Universal) (994fd12f8d3a5aa16f17d42c041e5809167e845a, 2025-12-17T14:15:14.850Z)
OS version: Darwin arm64 24.6.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.12.3
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| black-formatter | ms- | 2025.2.0 |
| debugpy | ms- | 2025.18.0 |
| js-debug | ms- | 1.105.0 |
| js-debug-companion | ms- | 1.1.3 |
| jupyter | ms- | 2025.9.1 |
| jupyter-keymap | ms- | 1.1.2 |
| jupyter-renderers | ms- | 1.3.0 |
| tom | 1.2.2 | |
| prettier-vscode | esb | 11.0.2 |
| python | ms- | 2025.20.0 |
| r | REd | 2.8.6 |
| r-syntax | REd | 0.1.3 |
| rainbow-csv | mec | 3.23.0 |
| remote-containers | ms- | 0.434.0 |
| remote-explorer | ms- | 0.5.0 |
| remote-server | ms- | 1.5.3 |
| remote-ssh | ms- | 0.122.0 |
| remote-ssh-edit | ms- | 0.87.0 |
| remote-wsl | ms- | 0.104.3 |
| svg-preview | Sim | 2.8.3 |
| 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.10.4 |
| vscode-remote-extensionpack | ms- | 0.26.0 |
Activity
anthonykim1 commentedon Dec 23, 2025
jennadiegel-cdio Could you provide a gif? Thanks
jennadiegel-cdio commentedon Dec 23, 2025
Anthony Kim (@anthonykim1)
This file (v2025.20.0) is the expected behavior, shift + enter opens a python terminal and runs the line of code
https://github.com/user-attachments/assets/35cba2b8-3b39-4ac8-90c5-2cc363010070
This file (v2025.20.1) is what is happening with the most recent version. Shift + enter opens a python terminal, does not run the line of code
https://github.com/user-attachments/assets/c47234e3-2494-4867-a2d2-f4284df4a63a
anthonykim1 commentedon Dec 28, 2025
jennadiegel-cdio Could you update VS Code to the latest insiders and try again? Insiders build
Also what do you see when hovering over terminal tab? Is it rich shell integration or something else
anthonykim1 commentedon Jan 5, 2026
Also see if there is any difference when you enable or disable environment extension:
Try install https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-python-envs
Can you update Python extension, Python environment extension to latest and see if you can still repro?
Also add
"python.useEnvironmentsExtension": true,to your settings.json.Try also
falseto see if any of those make a difference.jmpcm commentedon Jan 6, 2026
I'm having the same issue in Linux, with VSCode 1.107.1 and Python extension 2025.20.1. Setting
python.useEnvironmentsExtensiontotruesolved the issue.Just a note: I'm running a Python file in a large project with several C++ files (which is the main code base).
jennadiegel-cdio commentedon Jan 6, 2026
Setting the environments extension to true fixed the issue
One thing to note, I tried this when debugging initially, but I wasn't aware that I didnt have the Python Environment extension installed. When editing settings.json, no warning or info appears to show a setting is being changed for an extension that isnt installed.
Thank you for the help!