Skip to content

Severe performance degradation in WSL: Environment discovery hangs, Pylance broken, and execution blocked after recent Python environments update #1558

@Linkcy97

Description

@Linkcy97

Environment data

  • OS and Version: Windows 11 with WSL 2 (Ubuntu 20.04)
  • VS Code version: 1.123.0
  • Python Extension version: v2026.4.0 (and recent builds)
  • Python environment: Conda
    Describe the bug
    Since the recent updates (specifically the new environment discovery mechanism / decoupling of vscode-python-environments), the Python extension has become practically unusable in WSL.

The extension continuously triggers background scans (e.g., "Discovering Pyenv Python versions") that hang indefinitely. Because the environment discovery is completely blocked or extremely slow, it cascades into crippling the entire development workflow:

  1. Environment selection hangs: Clicking the bottom-right Python environment takes forever to load or simply freezes.
  2. IntelliSense/Pylance breaks: "Go to Definition" and code completion stop working entirely because the language server seems to be waiting for the environment initialization.
  3. Execution fails: Attempting to run code or start a debugging session is heavily delayed or fails to launch.
  4. Overall IDE lag: The extension host seems severely bogged down, making everything feel sluggish.

Steps to reproduce

  1. Open a project in WSL via the "Remote - WSL" extension.
  2. Ensure there are Conda environments installed in the WSL instance.
  3. Open a Python file.
  4. Look at the status bar: it gets stuck at "Discovering Python versions" or similar prompts.
  5. Try to use "Go to Definition" or run the code -> No response.

Expected behavior
Environment discovery should not block the main features of the extension. Once a Conda environment is explicitly selected, the extension should immediately activate it and start the language server, rather than infinitely scanning the rest of the WSL filesystem.

Workaround
Rolling back the Python extension to an older version (and disabling auto-update) immediately resolves all the above issues. The environment loads instantly, and Pylance works perfectly. This proves it is a regression caused by the new environment discovery design.


Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions