Skip to content

Commit

Permalink
lsp-rust: Allow debugging with GDB 14. (#4444)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Milosavljevic authored Apr 28, 2024
1 parent 32bf5aa commit ab8ce86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clients/lsp-rust.el
Original file line number Diff line number Diff line change
Expand Up @@ -1513,8 +1513,8 @@ and run a compilation"
(defun lsp-rust-analyzer-debug (runnable)
"Select and debug a RUNNABLE action."
(interactive (list (lsp-rust-analyzer--select-runnable)))
(unless (featurep 'dap-cpptools)
(user-error "You must require `dap-cpptools'"))
(unless (or (featurep 'dap-cpptools) (featurep 'dap-gdb))
(user-error "You must require `dap-cpptools' or 'dap-gdb'"))
(-let (((&rust-analyzer:Runnable
:args (&rust-analyzer:RunnableArgs :cargo-args :workspace-root? :executable-args)
:label) runnable))
Expand All @@ -1541,7 +1541,7 @@ and run a compilation"
(`() (user-error "No compilation artifacts or obtaining the runnable artifacts failed"))
(`(,spec) spec)
(_ (user-error "Multiple compilation artifacts are not supported")))))
(list :type "cppdbg"
(list :type (if (featurep 'dap-gdb) "gdb" "cppdbg")
:request "launch"
:name label
:args executable-args
Expand Down

0 comments on commit ab8ce86

Please sign in to comment.