0

I am working in a multithreading project in Python using VSCode and the Python extension. Everything was working right until suddenly, without me changing any setting) it stopped showing the running processes and threads in the Call Stack. The Call Stack is now empty until it stops on a breakpoint.

This is only for Python. For C++, e.g, it works, as shown in the following image:

c++ call stack; showing running threads

Here follow my configuration files:

settings.json:

{
    "python.pythonPath": "C:\\Users\\tiago\\AppData\\Local\\Programs\\Python\\Python38\\python.exe",
    "python.linting.pylintEnabled": false,
    "python.linting.enabled": true,
    "python.linting.pylamaEnabled": false,
    "python.linting.flake8Enabled": true
}

launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "externalTerminal"
        }
    ]
}
Tiago
  • 347
  • 1
  • 3
  • 12
  • It is recommended that you disable other non-essential extensions to avoid interference between them. In addition, please try to use other versions of Python extensions and reload VSCode. – Jill Cheng Oct 08 '20 at 07:13
  • @JillCheng I have disabled all extensions except the Python extension and the problem persists – Tiago Oct 08 '20 at 12:05
  • I noticed that you also submitted this question [here](https://github.com/microsoft/debugpy/issues/435), and the information in that link is more comprehensive, so I connected these two links for more people's reference. – Jill Cheng Oct 09 '20 at 07:20

1 Answers1

0

This was happening because I had the 'GEVENT_SUPPORT' environment variable set to True, and as @fabioz said, "In the gevent mode the debugger expects the threading modules to be monkey-patched by gevent and thus it doesn't track those (as in gevent mode you're only expected to have 1 main thread)."

Tiago
  • 347
  • 1
  • 3
  • 12