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,193 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,004 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. Paul Bennett 0 Reputation points
    2023-01-27T15:53:37.6466667+00:00

    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

  2. Brouwer, Suzanne 0 Reputation points
    2023-02-10T07:32:03.6666667+00:00

    I also still have this issue in 2023... Using a remote SSH and when trying to use my venv on remote location as Interpreter, the dubugger does not do anything anymore...


  3. Stefan E 0 Reputation points
    2023-03-11T21:38:38+00:00

    Jupiter debugging still broken - roll-back of Python extension doesn't help

    0 comments No comments

  4. Amelia Miner 0 Reputation points
    2023-07-13T20:38:51.1466667+00:00

    Having this same issue right now on my system. Python extension that breaks debugging is 2023.12.0. Switching to pre release does not fix it. Downgrading to the previous version does not fix it (odd since it was working yesterday). Downgrading to v2021.12.1559732655 does fix it.

    Windows 10 22H2
    VS Code "about" window:
    Version: 1.80.1 (user setup)

    Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771

    Date: 2023-07-12T17:22:07.651Z

    Electron: 22.3.14

    ElectronBuildId: 21893604

    Chromium: 108.0.5359.215

    Node.js: 16.17.1

    V8: 10.8.168.25-electron.0

    OS: Windows_NT x64 10.0.19045


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.