add debugging config

This commit is contained in:
vladstojna 2023-04-22 19:50:41 +01:00 committed by vladstojna
parent 7419bd147e
commit dd144abebf
8 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,10 @@
local dap = require('dap')
dap.adapters.codelldb = {
type = 'server',
port = "${port}",
executable = {
command = vim.fn.stdpath('data') .. '/mason/bin/codelldb',
args = { "--port", "${port}" },
}
}

View file

@ -0,0 +1,7 @@
local dap = require('dap')
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = vim.fn.stdpath('data') .. '/mason/bin/OpenDebugAD7'
}

View file

@ -0,0 +1 @@
require('custom.dap.adapters.cpptools')

View file

@ -0,0 +1,6 @@
local dap = require('dap')
dap.adapters.lldb = {
type = 'executable',
command = 'lldb-vscode'
}

View file

@ -0,0 +1,7 @@
local dap_vscode = require('dap.ext.vscode')
dap_vscode.load_launchjs(nil, {
cppdbg = { 'c', 'cpp', 'rust' },
lldb = { 'c', 'cpp', 'rust' },
codelldb = { 'c', 'cpp', 'rust' },
})

2
lua/custom/dap/init.lua Normal file
View file

@ -0,0 +1,2 @@
require('custom.dap.adapters')
require('custom.dap.config')