VS Code Debugger not working for python

GHANASHYAM SATPATHY 296 Reputation points

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
OS: Windows_NT x64 10.0.18363

An early response is highly appreciated.


Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,803 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.
836 questions
{count} votes

Accepted answer
  1. NickS 286 Reputation points

    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.

    12 people found this answer helpful.

8 additional answers

Sort by: Most helpful
  1. Neely, Ronald 11 Reputation points

    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

    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. pk_1996 1 Reputation point

    Happening repeatedly to me too. I am on a Windows OS. Was not happening previously when I was on a Ubuntu system!
    Need to downgrade the Python extension version. The above-mentioned version mentioned worked for me.

    0 comments No comments

  4. Paul Bennett 0 Reputation points

    Go to the output window and look in the python logs when you press debug it will tell you what the command being tried is.

    Replicate that command in the terminal and you'll get a good idea of the issue.

    My problem was that I was trying to debug a script on a python 3.6 venv. VSCode comes bundled with a version of debugpy that was too high for 3.6.

    I replaced the debugpy module (%USERPROFILE%.vscode\extensions\ms-python.python-2023.1.10091012\pythonFiles\lib\python\debugpy) with debugpy v1.5.1.

    This worked for me but is obviously not great practice.

    0 comments No comments