Add "cwd": "${fileDirname}"
in launch.json
{
"version": "0.2.0",
"configurations":
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${fileDirname}",
"justMyCode": false
}
}
Set "purpose": ["debug-test"]
:
{
"version": "0.2.0",
"configurations":
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"cwd": "${fileDirname}",
"justMyCode": false,
"purpose": ["debug-test"]
}
}