dap-mode icon indicating copy to clipboard operation
dap-mode copied to clipboard

`rust-gdb` has error with the configuration in doc.

Open ccqpein opened this issue 3 years ago • 2 comments

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?

ccqpein avatar Apr 11 '22 00:04 ccqpein

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 avatar Aug 09 '24 15:08 daym

@daym Thanks, let me try

ccqpein avatar Aug 10 '24 01:08 ccqpein