mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.47k stars 194 forks source link

How to solve `Debugger executable '/usr/local/bin/gdb' is not signed. ` #1022

Closed EdwardWong1994 closed 1 year ago

EdwardWong1994 commented 1 year ago

Debug adapter definition and debug configuration

local dap = require('dap') dap.adapters.cppdbg = { id = 'cppdbg', type = 'executable', command = '~/.local/share/nvim/mason/extension/debugAdapters/bin/OpenDebugAD7', }

dap.configurations.cpp = { { name = "Launch file", type = "cppdbg", request = "launch", program = function() return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') end, cwd = '${workspaceFolder}', stopAtEntry = true, }, }

dap.configuration.c = dap.configurations.cpp

Debug adapter version

v1.14.4

Steps to Reproduce

I can successfully toggle breakpoint, but when i try to continue, it will throw the error: Debugger executable '/usr/local/bin/gdb' is not signed

Expected Result

expected it can successfully debug

Actual Result

Occur error"Debugger executable '/usr/local/bin/gdb' is not signed"

mfussenegger commented 1 year ago

I'm sorry but the issue tracker here is for feature requests and bug reports and not for general debug adapter support.

There is probably an issue with your gdb or adapter installation

tracyone commented 10 months ago

@EdwardWong1994

I think following link can help you :

https://sourceware.org/gdb/wiki/PermissionsDarwin

https://dev.to/jasonelwood/setup-gdb-on-macos-in-2020-489k

https://www.jianshu.com/p/303bc5f53a52

The root cause of this issue is the Darwin kernel does not allow gdb to control another process without having special rights