You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
Activity
karrtikr commentedon Feb 9, 2022
Are you using a conda interpreter? If so, please update
condato the latest version.karthiknadig commentedon Feb 9, 2022
Please follow the instructions here to test out and see if the
condayou are using works #18436 (comment)dalemyers commentedon Feb 9, 2022
karthiknadig commentedon Feb 9, 2022
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.
dalemyers commentedon Feb 10, 2022
This is the only line:
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.