0%

使用VSCode调试Python

首先通过单击Run启动调试程序,然后选择创建配置文件launch.json,配置文件内容示例如下:

示例如下:

1
2
3
4
5
6
7
8
9
10
11
12
    "version": "0.2.0",
"configurations": [
{
"name": "debug train.py",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": ["--dataset", "COCO", "--dataset_root", "D:/Desktop/tiny-datasets/coco2014/small_coco", "--image_set", "train_2017_small", "--batch_size", "2", "--cuda", "False"]
}
]
}
------ 本文结束 ------