feat(dap): Added debugger from cpptools

Added:
  - OpenDebugAD7 from [vscode-cpptools](https://github.com/microsoft/vscode-cpptools)

It works better with `nvim-dap-ui`. With GDB you have to wait for stdout
flush to see program output, the output is in the repl instead of the
console, etc. The VSCode debugger doesn't have such issues.
This commit is contained in:
Jiří Štefka 2024-09-25 23:57:17 +02:00
parent 1441e90711
commit db5a3f56b4
Signed by: jiriks74
GPG key ID: 1D5E30D3DB2264DE
3 changed files with 80 additions and 12 deletions
nvim/ftplugin

View file

@ -35,20 +35,16 @@ dap.adapters.gdb = {
args = { "-i", "dap" }
}
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = 'OpenDebugAD7',
}
dap.configurations.c = {
-- {
-- name = "Launch",
-- type = "gdb",
-- request = "launch",
-- program = function()
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
-- end,
-- cwd = "${workspaceFolder}",
-- stopAtBeginningOfMainSubprogram = false,
-- },
{
name = "Launch an executable",
type = "gdb",
type = "cppdbg",
request = "launch",
cwd = "${workspaceFolder}",
program = function()
@ -70,6 +66,6 @@ dap.configurations.c = {
:find()
end)
end,
stopAtBeginningOfMainSubprogram = false,
stopAtBeginningOfMainSubprogram = true,
},
}