VS Code Debugger not working for python

GHANASHYAM SATPATHY 306 Reputation points
2022-02-07T07:03:40.79+00:00

I am experiencing debugging issue for my VS Code in WIN-10. It happened since weekend when I did OS restart . It was working fine before and I had launch.json configured too. Debugging was working fine. Any troubleshooting tips. It seems when I do Run->"start Debugging' no command comes to terminal. Any VS Code log file that I can look at to troubleshoot the issue. Following is the VS Code version I have in my system.

Version: 1.64.0 (user setup)
Commit: 5554b12acf27056905806867f251c859323ff7e9
Date: 2022-02-03T04:22:20.678Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.18363

An early response is highly appreciated.

Thanks

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,221 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,005 questions
{count} votes

Accepted answer
  1. NickS 306 Reputation points
    2022-02-07T14:52:13.097+00:00

    The Python extension is broken - just seems to have updated at the same time as VS Code.

    Go back to extension version v2021.12.1559732655 by clicking on the extensions control and selecting "Install another version...". Note that you will have to disable "Extensions: Auto Update", which might be a good thing. I also set "Update: Mode" to "none" for good measure.

    13 people found this answer helpful.

9 additional answers

Sort by: Most helpful
  1. Neely, Ronald 11 Reputation points
    2022-07-23T00:20:28.487+00:00

    So this bug is back with Python Extension version v2022.10.1 running on Ubuntu 18.04 with python 3.6.9.
    This is a serious bug that keeps happening.
    I had to roll back to extension version v2021.12.1559732655 to debug.

    2 people found this answer helpful.

  2. Mickey Cohen 6 Reputation points
    2022-04-06T15:56:05.73+00:00

    Click on the python extention (publisher microsoft) and select "install pre-release". It would be V2022.5.10961002 (you can see it when you hover with the mouse above the extension)

    Fixed the problem for me.

    1 person found this answer helpful.
    0 comments No comments

  3. Yuval Kuperberg 5 Reputation points
    2023-01-31T08:24:41.5533333+00:00

    Still happening in 2023... Switching python version didn't help, how is this still an issue??

    1 person found this answer helpful.
    0 comments No comments

  4. Moritz Wolf 5 Reputation points
    2024-09-18T13:22:43.64+00:00

    I had the same issue in September 2024 and resolved it by

    • removing ./venv/ and ./.venv/ in my working directory
    • recreate the virtual environment
    • run my debug launch config specified in ./.vscode/launch.json (via F5)
    • redirect missing python interpreter path to the one specified in the venv
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.