Update the debugging config
Add a debug mode with <leader>g
This commit is contained in:
parent
2821a9a153
commit
619c9e8195
6 changed files with 109 additions and 30 deletions
|
|
@ -1,18 +1,34 @@
|
|||
|
||||
local dap = require("dap")
|
||||
dap.adapters.gdb = {
|
||||
-- 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}",
|
||||
-- },
|
||||
-- }
|
||||
|
||||
dap.adapters.cppdbg = {
|
||||
type = "executable",
|
||||
command = "gdb",
|
||||
args = { "-i", "dap" }
|
||||
args = { "-i", "dap" },
|
||||
console = 'externalTerminal',
|
||||
-- terminal_win_cmd = "tabnew",
|
||||
}
|
||||
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}",
|
||||
},
|
||||
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = 'lldb-vscode', -- adjust as needed, must be absolute path
|
||||
name = 'lldb'
|
||||
}
|
||||
|
||||
require('dap.ext.vscode').load_launchjs("dap_config.json", {
|
||||
cppdbg = { 'c', 'cpp' },
|
||||
lldb = { 'c', 'cpp' }
|
||||
})
|
||||
|
||||
dap.set_log_level("TRACE")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue