在全局Setting 里面加入
"launch": {
"configurations": [
{
"name": "Python: 当前文件,当前路径",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${fileDirname}"
}
],
"compounds": []
}