Files
doomemacs/modules/tools/debugger/autoload/debugger.el
Henrik Lissner b4bd368485 refactor!(debugger): replace realgud with dape
BREAKING CHANGE: Anyone used to realgud will find it missing as of this
commit. It's been replaced with Dape (see
https://github.com/svaante/dape).

This change was made because realgud's implementation was archaic and
over-complicated, dap-mode requires lsp-mode (and has a lot of moving
parts and points of failure), and dape is straight-forward by
comparison; to set up and use. Note that dap-mode and dap-ui is now
deprecated and will be removed in the future, but still remains behind
the +lsp flag for backwards compatibility, at least until v3.

This also adds a '<leader> d' prefix for debugger commands (except for
vanilla users, who already have dape's prefix on 'C-x C-a')
2025-04-23 04:02:06 -04:00

26 lines
782 B
EmacsLisp

;;; tools/debugger/autoload/debugger.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +debugger/start ()
"Start a debugger in the current project and buffer."
(interactive)
(call-interactively
(if (and (modulep! +lsp)
(bound-and-true-p lsp-mode)
(require 'dap-mode nil t))
#'dap-debug
#'dape)))
;;;###autoload
(defun +debugger/quit ()
"Quit the active debugger session."
(interactive)
(if-let* ((conn (and (modulep! +lsp)
(require 'dap-mode nil t)
(dap--cur-session))))
(dap-disconnect conn)
(if-let* ((conn (and (featurep 'dape)
(dape--live-connection 'parent t))))
(dape-quit conn)
(user-error "No debugger session to quit"))))