我正在使用 VSCode 和 Python 扩展在 Python 中的多线程项目中工作。一切正常,直到突然,我没有更改任何设置)它停止显示调用堆栈中正在运行的进程和线程。调用堆栈现在是空的,直到它在断点处停止。
这仅适用于 Python。例如,对于 C++,它可以工作,如下图所示:
这里遵循我的配置文件:
设置.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
}
启动.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"
}
]
}