dap-mode
dap-mode copied to clipboard
`rust-gdb` has error with the configuration in doc.
I have gdb and rust-gdb installed in my macOS. I have tried both of them inside the terminal, and it usually works.
But when I M-x dap-debug, it shows the icons at the head of the window and that's it, nothing more. I check the *GDB:Run stderr buffer and find the error message:
(node:31253) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use
node --trace-deprecation ...to show where the warning was created) attempt to send more than one response for command launch Failed to unlink debug server
- I ran
(require 'dap-gdb-lldb)and(dap-gdb-lldb-setup)in my emacs configuration. - my debug template copy from the doc, and it looks like:
(dap-register-debug-template
"Rust::GDB Run Configuration"
(list :type "gdb"
:request "launch"
:name "GDB::Run"
:gdbpath "rust-gdb"
:target nil
;; these lines copy form somewhere else and no matter they are here or not
;; don't change anything
:dap-compilation "cargo build"
:dap-compilation-dir "${workspaceFolder}"
:cwd "${workspaceFolder}"))
Is anyone know what/why are the problems? How can I fix it?
I'd suggest you uses (require 'dap-gdb) if your gdb is new enough (>= 14), then "node" (from your error message) is out of the picture entirely.
@daym Thanks, let me try