经过有关代码签名的技巧之后,我必须使gdb在我的Mac(10.14.6)上运行,但只能在终端上运行,并且在vs代码中没有任何响应。
一切在终端上都可以正常工作,例如设置断点,打印变量和运行可执行文件,但是它卡在vs代码中,并且在变量和调用堆栈部分中什么都没有显示。
这是我的launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/local/bin/gdb",
/* "setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
], */
"preLaunchTask": "Build"
}
]
}