Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

RustDebugables not work #436

Open
BlackCatHehe opened this issue Dec 5, 2023 · 0 comments
Open

RustDebugables not work #436

BlackCatHehe opened this issue Dec 5, 2023 · 0 comments

Comments

@BlackCatHehe
Copy link

When I try to use RustDebuggables I get this error

.../zjy/.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1420: Error running lldb-vscode: ENOENT: no such file or directory
stack traceback:
	[C]: in function 'error'
	.../zjy/.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1420: in function 'spawn'
	/Users/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap.lua:1041: in function 'launch'
	/Users/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap.lua:373: in function 'run_adapter'
	/Users/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap.lua:408: in function 'maybe_enrich_config_and_run'
	/Users/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap.lua:504: in function </Users/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap.lua:488>
	[C]: in function 'xpcall'
	...rs/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap/async.lua:12: in function <...rs/zjy/.local/share/nvim/lazy/nvim-dap/lua/dap/async.lua:11>

CleanShot 2023-12-05 at 11 46 34

here is my config

return {
  "simrat39/rust-tools.nvim",
  dependencies = { "neovim/nvim-lspconfig" },
  opts = function()
    local rt = require("rust-tools")
    rt.setup({
      tools = {
        executor = require("rust-tools.executors").termopen,
        inlay_hits = {
          auto = true,
        },
      },
      server = {
        on_attach = function(_, bufnr)
          -- Hover actions
          vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
          -- Code action groups
          vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
        end,
      },
      dap = {
        adapter = function()
          local codelldb_path = "/Users/zjy/.vscode/extensions/vadimcn.vscode-lldb-1.10.0/adapter/codelldb"
          local liblldb_path = "/Users/zjy/.vscode/extensions/vadimcn.vscode-lldb-1.10.0/lldb/lib/liblldb.dylib"
          require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path)
        end,
      },
    })
  end,
}

codelldb_path does exists
CleanShot 2023-12-05 at 11 44 47@2x

I tried many ways, but none of them worked
Please help me, I've been stuck for days

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant