一、创建launch.json文件
二、选择python
三、写法转换示例
python train.py mot --load_model "../models/fairmot_dla34.pth"
对应:
{
// 使用 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,
"args": [
"mot",
"--load_model",
"../models/fairmot_dla34.pth"
]
}
]
}
四、切换到待调试的文件,点击调试
需要单击这个绿色的箭头按钮进行调试
,这样在 launch.json 中的配置才会生效。