rust-tools.nvim
rust-tools.nvim copied to clipboard
Debug adabter didn't respond on Windows
Hi there,
I am a VS Code user and wanted to try out Neovim (version 0.7) for Rust development. I found this nice plugin. I still cannot get debugging to work on Windows 10. After downgrading codelldb
to 1.6.7 due to #157, I have added
call plug#begin(stdpath('data') . '/plugged')
Plug 'nvim-lua/plenary.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'simrat39/rust-tools.nvim'
Plug 'mfussenegger/nvim-dap'
Plug 'rcarriga/nvim-dap-ui'
call plug#end()
to my init.vim
and run :PlugInstall
. Further, I have added
lua <<EOF
local nvim_lsp = require'lspconfig'
-- Update this path
local extension_path = 'c:/Users/username/.vscode/extensions/vadimcn.vscode-lldb-1.6.7/'
local codelldb_path = extension_path .. 'adapter/codelldb'
local liblldb_path = extension_path .. 'lldb/bin/liblldb.dll'
local opts = {
dap = {
adapter = require('rust-tools.dap').get_codelldb_adapter(
codelldb_path, liblldb_path)
}
}
require('rust-tools').setup(opts)
local dap = require('dap')
dap.set_log_level('TRACE')
EOF
to my init.vim
. I can see hints provided by Rust Analyzer in my code. However, when I try to debug via RustDebuggables
it says Debug adapter didn't respond...
.
If I try to add breakpoints via
:lua require'dap'.toggle_breakpoint()
they are rejected. If I start codelldb
from some terminal it says listening on port somenumber
.
Am I doing something wrong? What are possible sources of wrong configuration? Any help is appreciated.
I use codelldb 1.6.10 and nvim-dap-ui, and do the following steps after setting some breakpoints:
-
:RustHoverActions
- select
Debug
Everything is fine.
https://user-images.githubusercontent.com/25300418/165668382-47edef1d-b9b9-4eb7-813e-a3807df6783d.mp4
Thanks for the feedback. I have also tried 1.6.10 without luck. Probably, I have some mis-configuration somewhere.
I ran into the same problem:
- Set a breakpoint
- Select Debug in the floating window
- There was no response
Here is my configuration and the corresponding version
-- rust-tools
local extension_path = vim.env.HOME .. '/.vscode/extensions/vadimcn.vscode-lldb-1.7.0/'
local codelldb_path = extension_path .. 'adapter/codelldb'
local liblldb_path = extension_path .. 'lldb/bin/liblldb.dll'
local opts = {
-- ... other configs
tools = {
hover_actions = {
auto_focus = true,
}
},
dap = {
adapter = require('rust-tools.dap').get_codelldb_adapter(
codelldb_path, liblldb_path)
}
}
-- Normal setup
require('rust-tools').setup(opts)
require("dapui").setup()
nvim -v
NVIM v0.7.0
Build type: RelWithDebInfo
LuaJIT 2.1.0 -beta3
Compiled by runneradmin@fv-az320-113
Features: -acl +iconv +tui
See ":help feature-compile"
System vimrc file: "$VIM \ sysinit VIM"
Fallback for $VIM: "C:/Program Files/nvim/share/nvim"
Run :checkhealth for more info
https://user-images.githubusercontent.com/83944508/166919381-1bf68793-d1b1-4fb2-a664-2899f48ddd7a.mp4