Skip to content

Python debugger fails to launch #18486

Closed
Closed

Description

@dalemyers

Issue Type: Bug

Starting at some point in the last ~21 hours I became unable to launch the Python debugger. When I try to launch it (either via the play button on the run and debug pane, or with F5) it tries to run the launcher script in the terminal but then silently exists. I see no errors in any output windows other than in the Window one which says "Server[1] disconnected unexpectedly" (as does the developer console).

I've not changed anything about my configuration. I've tried to restart VSCode. I've rebooted my machine. Other Python debugging functionality works, such as debugging Azure functions.

I do see that the Python extension updated in that ~21 hour window though.

Extension version: 2022.0.1814523869
VS Code version: Code 1.64.1 (d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03, 2022-02-07T17:26:08.977Z)
OS version: Darwin x64 21.2.0
Restricted Mode: No

Activity

  1. karrtikr commented on Feb 9, 2022

    @karrtikr

    Are you using a conda interpreter? If so, please update conda to the latest version.

  2. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Feb 9, 2022
  3. karthiknadig commented on Feb 9, 2022

    @karthiknadig
    Member

    Please follow the instructions here to test out and see if the conda you are using works #18436 (comment)

  4. dalemyers commented on Feb 9, 2022

    @dalemyers
    Author
  5. karthiknadig commented on Feb 9, 2022

    @karthiknadig
    Member

    Dale (@dalemyers) Can you share logs from Output > Python tab? Try running the debugger before you share the logs. this way it will capture the command used to launch the debugger.

  6. dalemyers commented on Feb 10, 2022

    @dalemyers
    Author

    This is the only line:

    DAP Server launched with command: /Users/dalemy/.pyenv/versions/3.10.0a6/bin/python /Users/dalemy/.vscode/extensions/ms-python.python-2022.0.1814523869/pythonFiles/lib/python/debugpy/adapter
    

    However, that showed me what the issue is. It's running the pyenv installation rather than the one in the projects virtual environment. I'm not sure why it changed. It's definitely not something I did manually, but switching back to the Python version in the virtual environment solves this issue.

  7. locked as resolved and limited conversation to collaborators on Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-debuggingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions