Skip to content

The extension breaks Shift + Enter #1820

Description

@vorand

Environment data

  • Python Environments extension version: 1.38.0
  • Python extension (ms-python.python) version: 2026.4.0
  • VS Code version (Help → About): 1.139.0
  • OS and version:
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2026.3"
VERSION="2026.3"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.14.7, provided by the OS
  • Environment manager in use (venv / conda / pyenv / poetry / pipenv / system / uv / other): venv and uv
  • Shell (bash / zsh / fish / pwsh / cmd / other): zsh
  • Remote / container scenario (none / WSL / SSH Remote / Dev Container / Codespaces): none
  • Workspace type (single folder / multi-root / mono-repo): single folder

Repro Steps

  1. Open a Python file
  2. Select a piece of Python code
  3. Press Shift + Enter

Expected behavior

  1. Terminal window is open
  2. Python interpreter is running
  3. The selected code is inserted into the interpreter.

Actual behavior

  1. Terminal is not started.
  2. The following error message appears: "Invalid arguments to create terminal"

Logs

#Python
2026-09-25 10:57:07.571 [info] > /usr/bin/python ~/.vscode/extensions/ms-python.python-2026.4.0-linux-x64/python_files/normalizeSelection.py
2026-09-25 10:57:07.573 [debug] CreateEnv Trigger - Skipping No URI provided
2026-09-25 10:57:07.624 [error] ensureTerminalLegacy - Did not return terminal successfully.
2026-09-25 10:57:07.624 [error] ensureTerminalLegacy - pythonEnv: id=Python 3.14.7-y7jaf0hvux, managerId=ms-python.python:system, name=Python 3.14.7, version=3.14.7.final.0, executable=/usr/bin/python
2026-09-25 10:57:07.624 [error] ensureTerminalLegacy - project: undefined
2026-09-25 10:57:07.624 [error] ensureTerminalLegacy - options: name=Python, cwd=undefined, hideFromUser=undefined
2026-09-25 10:57:07.624 [error] ensureTerminalLegacy - resource: file:///tmp/test_1.py

#Python Environment
2026-09-25 10:57:04.377 [debug] inlineScriptLazyDetector: event received (open) output:ms-python.python.Python.log
2026-09-25 10:57:04.378 [debug] inlineScriptLazyDetector: skipped (open) output:ms-python.python.Python.log (scheme='output', extname='.log', inWorkspace=false)
2026-09-25 10:57:59.742 [debug] inlineScriptLazyDetector: event received (open) output:ms-python.vscode-python-envs.Python%20Environments.log
2026-09-25 10:57:59.743 [debug] inlineScriptLazyDetector: skipped (open) output:ms-python.vscode-python-envs.Python%20Environments.log (scheme='output', extname='.log', inWorkspace=false)

With the extansion disabled

#Python
2026-09-25 11:04:25.617 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:25.617 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:28.969 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:29.260 [debug] Delay Trigger[Test Configuration Change]: triggered=4, called=4
2026-09-25 11:04:32.105 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:34.993 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:49.955 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:49.956 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:49.984 [info] > /usr/bin/python ~/.vscode/extensions/ms-python.python-2026.4.0-linux-x64/python_files/normalizeSelection.py
2026-09-25 11:04:49.986 [debug] CreateEnv Trigger - Skipping No URI provided
2026-09-25 11:04:50.070 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:50.070 [debug] Terminal shell path '/usr/bin/zsh' identified as shell 'zsh'
2026-09-25 11:04:50.070 [debug] Shell identified as zsh 
2026-09-25 11:04:50.171 [debug] Terminal name 'Python' identified as shell 'other'
2026-09-25 11:04:50.172 [debug] Terminal shell path '/usr/bin/zsh' identified as shell 'zsh'
2026-09-25 11:04:50.172 [debug] Shell identified as zsh (Terminal name is Python)
2026-09-25 11:04:50.172 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:50.173 [debug] could not find a pixi interpreter for the interpreter at /usr/bin/python
2026-09-25 11:04:50.173 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:50.173 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:50.182 [debug] Found cached env for /usr/bin/python
2026-09-25 11:04:50.183 [info] Send text to terminal: /usr/bin/python
2026-09-25 11:04:50.183 [debug] Shell Integration is disabled, sendText: /usr/bin/python
2026-09-25 11:04:50.313 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:50.423 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:50.552 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:50.553 [debug] Python REPL queued command: import os
2026-09-25 11:04:50.594 [debug] Python REPL ready from terminal shell api
2026-09-25 11:04:50.594 [debug] Executing queued REPL command: import os
2026-09-25 11:04:50.594 [info] Send text to terminal: import os
2026-09-25 11:04:50.718 [debug] Received shell integration sequence for zsh
2026-09-25 11:04:51.131 [debug] Delay Trigger[Test Configuration Change]: triggered=5, called=5
2026-09-25 11:04:54.138 [debug] Found cached env for /usr/bin/python

#Python Environment
Empty log

Additional context

If I disable the extension, the feature is working correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions