My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
812 B

  1. local dap = require('dap')
  2. dap.adapters.cppdbg = {
  3. id = 'cppdbg',
  4. type = 'executable',
  5. command = '/home/rinri/.config/nvim/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
  6. }
  7. dap.configurations.cpp = {
  8. {
  9. name = "Launch file",
  10. type = "cppdbg",
  11. request = "launch",
  12. program = function()
  13. return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
  14. end,
  15. cwd = '${workspaceFolder}',
  16. stopOnEntry = true,
  17. },
  18. {
  19. name = 'Attach to gdbserver :1234',
  20. type = 'cppdbg',
  21. request = 'launch',
  22. MIMode = 'gdb',
  23. miDebuggerServerAddress = 'localhost:1234',
  24. miDebuggerPath = '/usr/bin/gdb',
  25. cwd = '${workspaceFolder}',
  26. program = function()
  27. return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
  28. end,
  29. },
  30. }