参考:https://www.zhihu.com/question/30315894
launch.json
{ "version": "0.2.0", "configurations": [ { "name": "C++ Launch", "type": "cppdbg", "request": "launch", "program": "XXXXX/ffmpeg_g", "args": [ ], "stopAtEntry": false, "cwd": "${workspaceRoot}", "environment": [], "externalConsole": true, "preLaunchTask": "Compile", "linux": { "MIMode": "gdb" } } ] }
task.json
{ "version": "2.0.0", "tasks": [{ "label": "Compile", "command": "./compile.sh", "args": [], "type": "process", "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared" } }] }