Neovim Nvim-Dap issues configuring for C++ with Mason.nvim

637 Views Asked by At

I am unable to get nvim-dap functional for my neovim setup. It continually exits with code -1 and I'm not able to ever start debugging. I've ran this on multiple already-functional programs with no actual debugging issues. I don't believe its a permissions issue as I can run lldb on terminal as a standalone. Ideally I use mason-nvim-dap as this will make the config more portable (minimizing need external dependencies). I've tried countless configurations but will post the one I've gotten the farthest with. Any help appreciated!

  --DAP Installs
  {
    "rcarriga/nvim-dap-ui",
    event = "VeryLazy",
    dependencies = "mfussenegger/nvim-dap",
    config = function()
      local dap = require("dap")
      local dapui = require("dapui")
      dapui.setup()
      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
    end
  },
  {
    "jay-babu/mason-nvim-dap.nvim",
    event = "VeryLazy",
    dependencies = {
      "williamboman/mason.nvim",
      "mfussenegger/nvim-dap",
    },
    opts = {
      handlers = {}
    },
  },
  {
    "mfussenegger/nvim-dap",
    vim.keymap.set('n', '<leader>Dc', ':lua require"dap".continue()<CR>', {desc = '[d]ebug [c]ontinue'}),
  },


--DAP config
require("mason").setup()
require("mason-nvim-dap").setup({
  ensure_installed = {'codelldb'},
  automatic_installation = true,
})

Dap-repl console:
Console is in 'commands' mode, prefix expressions with '?'.
Launching: /Users/myname/Documents/code/400hw/ec3
Launched process 15338
Process exited with code -1.

Dap-terminal:
[Process Exited 0]

0

There are 0 best solutions below