VSCode Debug Python

发布时间 2023-06-27 16:01:11作者: 攻城狮?

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: demo",
            "type": "python",
            "request": "launch",
            "program": "demo.py",
            "console": "integratedTerminal",
            "justMyCode": true,
            "args": [],
            "cwd": "${workspaceFolder}/demo",
            "env": {
                "task": "panoptic",
                "CUDA_VISIBLE_DEVICES": "1",
                "PYTHONWARNINGS": "ignore" //能够忽略python warning, 相当于执行python -W
            }
            }
        }
    ]
}