python - VS Code Python 超时等待调试器连接
问题描述
昨天,在 Visual Studio Code 自我更新之前(从 1.27.2 到 1.28.2),我可以在激活某个环境并调试脚本后从 anaconda 提示符中打开它。现在,当我尝试调试脚本时,我收到有关超时等待调试器连接的错误。
我已经在另一个线程上遵循了一些建议(Visual Studio Code Python Timeout waiting for debugger connection),如果我使用下面的配置可以让它工作,但它似乎仍然是一个问题,它不会在集成中运行终端了。
这曾经有效,但现在中断:
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"stopOnEntry": true,
"console": "integratedTerminal"
},
如果我想在调试器控制台中运行,这现在可以工作。
{
"name": "Python: Debug",
"type": "python",
"request": "launch",
"program": "${file}",
"stopOnEntry": true,
"console": "none"
},
解决方案
我遇到了同样的问题,为了解决这个问题,我在文件中添加了以下行settings.json
:
{
// to fix 'Timeout waiting for debugger connections'
"python.terminal.activateEnvironment": false
}
推荐阅读
- django - 没有主键和 id 的 django 模型
- c# - 如何在.net核心中通过kafka和web api之间的标准开放遥测协议进行消息跟踪
- npm-install - 已安装 NPM Sim 模块和 Sim Cordova 插件,但仍未检测到模块
- ios - Xcode 构建错误“架构 arm64 的未定义符号”
- r - 如何在 R 中使用 rvest 在 URL 上抓取多个表
- reactjs - 一个组件正在更改要控制的电子邮件类型的不受控制的输入
- c# - 是否可以从具有扩展名的项目中创建一个对象
- ios - CAEmitterLayer - 从边界向内发射
- pandas - Pandas - 根据索引值用 nan 填充行
- postgresql - Apache Geode 与 Postgresql DBMS 的集成