Skip to content

Debugging Python code in a venv in WSL always takes two tries #862

Open

Description

@rzhao271

Testing #859

I'm using an Ubuntu WSL instance with pwsh as the default terminal profile.
When I debug a file with Python and with the Python Environments extension enabled, the terminal first runs the debugger commands, and then it cancels that command and runs the venv enablement command. As a result, the debugger fails to launch. On the second attempt, the debugger successfully runs the file because it is not intercepted by the venv enablement command. It successfully hits the breakpoint.

First attempt

Terminal showing cancelled debugger start command Timeout error dialog

Second attempt

Python debugger hitting the breakpoint

Activity

  1. added
    triage-needed
    on Nov 4, 2025
  2. rzhao271 commented on Nov 4, 2025

    @rzhao271
    ContributorAuthor

    This issue still occurs when python.useEnvironmentsExtension is set to false, but not when I change the default terminal profile to bash.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions