Open Spasitjel opened 1 year ago
Hey, did you manage to fix that I'm having the same problem and I have no idea how to fix it
Hey, did you manage to fix that I'm having the same problem and I have no idea how to fix it
Unfortunately not, I have stopped using nvim/vim altogether ^^'.
I have this issue which reproduces if I actively put myself in a certain setup with
nvim-dap
andnvim-dap-ui
, or it always happens if I'm using alsocmake-tools
(https://github.com/Civitasv/cmake-tools.nvim) to start debugging.I decided to open an issue here because the issue appears only when
nvim-dap-ui
is used (although the other behavior is questionable).I'm using nvim 0.8.3, nvim-dap 0.5.0 (but I've also tried the very latest) nvim-dap-ui v3.8.0 cmake-tools.nvim 1c2ad8e4ce63413cb3594d7e10239904f6b0bdcf
Setup with nvim-dap alone
:lua require'dap'.repl.open()
:lua require'dap'.run({ name = "cpp", program = "<path to program>", cwd = vim.loop.cwd(), type = "lldb", request = "launch" })
Then a copy of the buffer/source code is opened in the repl window. Not really desirable, but at least there's no error when I step
Setup with nvim-dap + nvim-dap-ui
Do all the previous steps, then this time the repl doesn't become a copy of the buffer I had opened with the source code, it stays a repl, the buttons to control the program appear, but all buttons a part from the play and the restart are greyed out. Furthermore, the issue, is that if I step with column , but: Cursor position outside buffer. Ensure executable is up2date and if using a source mapping ensure it is correct" (https://github.com/mfussenegger/nvim-dap/blob/7389e85233e3483b31b6a1c4ba69cda77336b7a8/lua/dap/session.lua#L383)
If then I move the cursor back to the split with the source code, then everything goes back to normal, and the buttons in the repl split are not greyed out anymore.
:lua require'dap'.step_over()
or into, doesn't matter,nvim-dap
complains that "Debug adapter reported a frame at linenvim-dap + nvim-dap-ui + cmake-tools (what I actually use)
I use this function to start debugging:
(and here the cmake-tools debug implementation: https://github.com/Civitasv/cmake-tools.nvim/blob/1c2ad8e4ce63413cb3594d7e10239904f6b0bdcf/lua/cmake-tools/init.lua#L320) It's the same if I use the provided
CMakeDebug
command viavim.cmd('CMakeDebug')
.Something I noticed here is that even though I'm asking to open the UI before requesting to debug, things happens in this order:
Sorry for the long explanation here but I'm not exactly sure who should be responsible to setup everything correctly. Thank you very much for your time! Let me know if I can do anything else to help.