vscode对python项目进行debug的launch.js
其中:name,request不用改,type是代码类型,program是运行的文件的位置,cwd这里是整个项目所在地址,这样可以调用项目下的文件
{
// 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",
"cwd": "${fileDirname}" #这里也可以直接将绝对路径写在这里
}
]
}