程序员的资源宝库

网站首页 > gitee 正文

nvim-dap - C - cpptools - gcc gdb

sanyeah 2024-03-29 17:22:17 gitee 5 ℃ 0 评论

https://github.com/microsoft/vscode-cpptools

msys mingw64 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

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表