【发布时间】:2020-10-07 18:01:14
【问题描述】:
我正在一个使用 VSCode 和 Python 扩展的 Python 多线程项目中工作。 一切正常,直到突然,我没有更改任何设置)它停止显示调用堆栈中正在运行的进程和线程。调用堆栈现在是空的,直到它在断点处停止。
这仅适用于 Python。例如,对于 C++,它可以工作,如下图所示:
这里是我的配置文件:
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"
}
]
}
【问题讨论】:
-
建议您禁用其他非必要的扩展,以避免它们之间的干扰。另外,请尝试使用其他版本的 Python 扩展并重新加载 VSCode。
-
@JillCheng 我已禁用除 Python 扩展之外的所有扩展,问题仍然存在
-
我注意到你也提交了这个问题here,而且那个链接里的信息比较全面,所以我把这两个链接连接起来供更多人参考。
标签: python visual-studio-code vscode-debugger vscode-python