错误信息如下: Starting program: /Users/xxx/work/projects/test_example/xxx/main Unable to find Mach task port for process-id 33500: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8)) 参考文档中的方法,亲测可用。 参考文档: 在macOS10.14上使用GDB的教程