进入调试口,需要本地和远程都装C/C++ estension
下面是在调mpi_enc_test的launch.json
文件自己make生成的 makefile 没改过
args项是输入参数,配置了相机输入,具体参数看他的demo说明,
记录一下,方便以后拷贝方便
json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/test/mpi_enc_test",
"args": [ "-i", "/dev/video0", "-f", "8", "-w", "1280", "-h", "720", "-o", "o1.h264", "-t", "7", "-n", "120"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
// "preLaunchTask":"Build",
"miDebuggerPath": "/usr/local/bin/gdb"
}
]
}