https://github.com/microsoft/vscode-cpptools
gcc gdb
local dap = require("dap")
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = 'c:\\gnu\\tool\\cpptools\\extension\\debugAdapters\\bin\\OpenDebugAD7.exe',
options = {
detached = false
}
}
local dap = require('dap')
dap.configurations.cpp = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input('', vim.fn.getcwd() .. '/bin', 'file')
end,
cwd = '${workspaceFolder}/bin',
stopAtEntry = false,
}
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
dapui = require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
标签:function,end,C++,dap,cpptools,dapui,configurations
From: https://www.cnblogs.com/Searchor/p/17320768.html