Skip to content

Python debugger fails to launch #18486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dalemyers opened this issue Feb 9, 2022 · 5 comments
Closed

Python debugger fails to launch #18486

dalemyers opened this issue Feb 9, 2022 · 5 comments
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@dalemyers
Copy link

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

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 9, 2022
@karrtikr
Copy link

karrtikr commented Feb 9, 2022

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

@karthiknadig karthiknadig self-assigned this Feb 9, 2022
@karthiknadig karthiknadig added area-debugging bug Issue identified by VS Code Team member as probable bug triage and removed triage-needed Needs assignment to the proper sub-team labels Feb 9, 2022
@karthiknadig
Copy link
Member

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

@dalemyers
Copy link
Author

dalemyers commented Feb 9, 2022 via email

@karthiknadig
Copy link
Member

@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.

@dalemyers
Copy link
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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants