修改 launch.json
在 launch.json
中,你需要指定要调试的 Python 文件的路径。
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: 特定文件",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/path/to/your/script.py", // 指定文件路径
"console": "integratedTerminal",
"justMyCode": true
}
]
}