vs代码版本:1.29.1(1.29.1)
python 版本:3.6.5
启动.json:
{
"name": "Python",
"type": "python",
"pythonPath":"${config.python.pythonPath}",
"request": "launch",
"stopOnEntry": true,
"console": "none",
"program": "${file}",
"cwd": "${workspaceRoot}",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
],
"env": {"name":"value"}
}
工作区设置:
{
"python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
"python.linting.pylintEnabled": true
}
当我测试调试时,我失败了。
据说“你需要在开始调试之前选择一个Python解释器”。 但我实际上选择了一个版本显示在左下角。
哪里不对?
最佳答案
我按照下面的代码进行编辑,它有效!!
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true
}
关于python - 关于VSCode设置Python调试的一个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53735230/