故障现象:
在windows下点击F5,以运行vscode代码,在屏幕右下角出现这个错误提醒;
故障原因:
在配置文件(settings.json或者launch.json)中,缺少“program”这个参数配置;
解决办法(步骤不一定很准确):
法一:在settings.json的“launch”里面,确保含有:
"type": "python",
"request": "launch",
"program": "${file}"
法二:
{
// 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": "integratedTerminal",
"justMyCode": true
}
]
}