Closed Felix-Kyun closed 1 year ago
i ended up configuring it manually here's the code
local dap = require 'dap'
-- c/cpp
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
-- command = '/home/felix/.config/nvim/dap/gdb/extension/debugAdapters/bin/OpenDebugAD7',
-- command = vim.fn.exepath('OpenDebugAD7'),
command = '/home/felix/.local/share/nvim/mason/bin/OpenDebugAD7',
}
dap.configurations.c = {
{
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,
setupCommands = {
{
text = '-enable-pretty-printing',
description = 'enable pretty printing',
ignoreFailures = false
},
},
},
{
name = 'Attach to gdbserver :1234',
type = 'cppdbg',
request = 'launch',
MIMode = 'gdb',
miDebuggerServerAddress = 'localhost:1234',
miDebuggerPath = '/usr/bin/gdb',
cwd = '${workspaceFolder}',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
setupCommands = {
{
text = '-enable-pretty-printing',
description = 'enable pretty printing',
ignoreFailures = false
},
},
},
}
nothing special though, it just uses mason to manage adapter instead of doing it manually
I am pretty sure this is what this plugin configures the dap with
But can't seem to understand why that errors is occurring
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
same error
error:
my config: