【发布时间】:2021-06-16 06:37:48
【问题描述】:
对 Python 和 VSCode(以及 stackoverflow)非常陌生。我已经用了大约 3 个月了,直到最近才正常使用。
当尝试在调试器中运行任何基本的 Python 程序时,弹出The Python path in your debug configuration is invalid. Source: Python(Extension) 出现并且调试器不会运行。我转到我的launch.json 文件,果然,我有设置 Python 的路径。
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"python": "${command:python.interpreterPath}"
}
]
}
与settings.json 混淆也无济于事,因为我确实设置了 Python 的路径,但调试器仍然无法运行。我不知道在这里做什么。我以前从未进入过我的 .json 文件,也从未在第一次安装 VSCode 后配置我的 Python 路径。
【问题讨论】:
标签: python python-3.x