Skip to content

codelldb debugging broken since version 3.13.0 #143

@paulkre

Description

@paulkre

Neovim version (nvim -v)

v0.9.2

Operating system/version

macOS 14.2.1

Output of :checkhealth rustaceanvim

rustaceanvim: require("rustaceanvim.health").check()

Checking for Lua dependencies ~
- OK [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) installed.

Checking external dependencies ~
- OK rust-analyzer: found rust-analyzer 0.3.1730-standalone (416e9c856 2023-11-12)
- OK Cargo: found cargo 1.75.0 (1d8b05cdd 2023-11-20)
- OK rustc: found rustc 1.75.0 (82e1608df 2023-12-21)
- OK debug adapter: found codelldb 

Checking config ~
- OK No errors found in config.

Checking for conflicting plugins ~
- OK No conflicting plugins detected.

How to reproduce the issue

:RustLsp debuggables (then select "build")

Expected behaviour

The debugger starts.

Actual behaviour

I get the following error:

No adapter exists named "codelldb". See ":h dap-adapter" for more information

The minimal config used to reproduce this issue.

vim.g.rustaceanvim = function()
  local this_os = vim.loop.os_uname().sysname;
  local extension_path = vim.env.HOME .. '/.vscode/extensions/vadimcn.vscode-lldb-1.10.0'
  local codelldb_path = extension_path .. '/adapter/codelldb'
  local liblldb_path = extension_path .. '/lldb/lib/liblldb' .. (this_os == "Linux" and ".so" or ".dylib")

  local cfg = require('rustaceanvim.config')
  return {
    dap = {
      adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
    },
    server = {
      on_attach = require 'on_attach',
    },
  }
end

local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system {
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable",
    lazypath,
  }
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  {
    "mfussenegger/nvim-dap",
    config = function()
      vim.keymap.set("n", "<F5>", function()
        if vim.bo.filetype == "java" then
          require("jdtls.dap").setup_dap_main_class_configs {
            on_ready = function()
              require("dap").continue()
            end,
          }
        else
          require("dap").continue()
        end
      end)
      vim.keymap.set("n", "<F10>", function() require("dap").step_over() end)
      vim.keymap.set("n", "<F11>", function() require("dap").step_into() end)
      vim.keymap.set("n", "<F12>", function() require("dap").step_out() end)
      vim.keymap.set("n", "<Leader>b", function() require("dap").toggle_breakpoint() end,
        { desc = "Toggle breakpoint (DAP)" })
      vim.keymap.set("n", "<Leader>B", function() require("dap").set_breakpoint() end, { desc = "Set breakpoint (DAP)" })
      vim.keymap.set("n", "<Leader>lp",
        function() require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: ")) end,
        { desc = "Set log point (DAP)" })
    end,
  },

  {
    "rcarriga/nvim-dap-ui",
    dependencies = { "mfussenegger/nvim-dap" },
    config = function()
      require("dapui").setup { expand_lines = false }
    end,
  },

  {
    'mrcjkb/rustaceanvim',
    version = '^3',
    ft = { 'rust' },
  },
  {
    'Saecki/crates.nvim',
    event = { 'BufRead Cargo.toml' },
    requires = { { 'nvim-lua/plenary.nvim' } },
    config = true,
  },
}, {})

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions