vscode launch.json debug 带caffe库的工程代码

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: 当前文件",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        },
        {
            "name": "debug",
            "type": "python",
            "request": "launch",
            //"program":"/data/Anaconda/envs/pytorch1.7.0_new/lib/python3.7/site-packages/torch/distributed/launch.py",
            "program":"/data/Anaconda/envs/pytorch1.7.0/lib/python3.7/site-packages/torch/distributed/launch.py",
            "console": "integratedTerminal",
            "cwd": "${fileDirname}",
            "env": {
                "CUDA_VISIBLE_DEVICES": "2",
                "LD_LIBRARY_PATH": "/data/Anaconda/envs/pytorch1.7.0/lib:${env:LD_LIBRARY_PATH}"
            },
            "args": [
                "--nproc_per_node=1",
                "--master_port",
                "34778",
                "main.py"
            ]
        },
    ]
}
posted @ 2025-10-31 17:02  无左无右  阅读(7)  评论(0)    收藏  举报