Skip to content

Instantly share code, notes, and snippets.

@HomyeeKing
Created July 22, 2023 08:50
Show Gist options
  • Save HomyeeKing/0c5a0c8207b25eeae90b4fa21fdcecfe to your computer and use it in GitHub Desktop.
Save HomyeeKing/0c5a0c8207b25eeae90b4fa21fdcecfe to your computer and use it in GitHub Desktop.
debug git in vscode
{
"version": "0.2.0",
"configurations": [
{
"name": "debug git command",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/git",
"args": [
"clean", // command you want to debug
"-Xdn"
],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"targetArchitecture": "arm64", // arch of yours
"preLaunchTask": "build with gmake",
"externalConsole": false,
"MIMode": "lldb"
}
]
}
{
"tasks": [
{
"type": "cppbuild",
"label": "build with gmake",
"command": "gmake",
"args": [
"CFLAG=-g" // 告诉编译器在编译源代码时生成调试信息
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "gmake build task"
}
],
"version": "2.0.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment