我正在使用Python运行visual studio代码教程,但无法连接到调试器。当我搜索的时候,Google / SO却一无所获。我通常使用Anaconda和Jupyter,所以我将Visual Studio代码连接到我激活的3.6虚拟环境中的python。我尝试过在我的虚拟环境中使用pip安装ptvsd,但这对我所看到的并没有什么影响。
我欢迎任何建议。截图如下。底部截图中的launch.json


发布于 2018-12-25 01:15:48
我也遇到了同样的问题,所以我在settings.json文件中添加了下面这一行:
{
// to fix 'Timeout waiting for debugger connections'
"python.terminal.activateEnvironment": false
}发布于 2018-10-10 18:37:24
今天我也遇到了同样的问题。我认为当调试器尝试连接到Visual Studio中集成的PowerShell终端时,可能会出现连接问题。如果我改为使用外部终端运行程序,那么它就可以正常工作,调试器连接到外部终端,我就可以很好地进行调试。这是我在launch.json中启动外部终端的入口
{
"name": "Python: Terminal (external)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
},发布于 2019-09-11 11:37:06
我也有同样的问题。使用"integratedTerminal“修复。
ps.my系统win7
{
"name": "Debug",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/main.Py",
"console": "integratedTerminal"
}https://stackoverflow.com/questions/52462599
复制相似问题