mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-18 16:06:56 -05:00
BREAKING CHANGE: This removes dap-mode from the debugger module. Use dape instead. dap-mode was deprecated inb4bd368
when realgud was replaced with dape, which has been excellent, so I want to focus this module's support on it going forward. Ref:b4bd368485
34 lines
1.1 KiB
EmacsLisp
34 lines
1.1 KiB
EmacsLisp
;;; tools/debugger/config.el -*- lexical-binding: t; -*-
|
|
|
|
;;
|
|
;;; Packages
|
|
|
|
(use-package! dape
|
|
:defer t
|
|
:preface
|
|
(setq dape-adapter-dir (file-name-concat doom-user-dir "debug-adapters/"))
|
|
:config
|
|
(set-debug-variable! 'dape-debug t)
|
|
(setq dape-buffer-window-arrangement 'right
|
|
dape-inlay-hints t
|
|
dape-cwd-function #'+debugger-dape-cwd-function-fn)
|
|
|
|
;; REVIEW: Remove when projectile is replaced with project.el
|
|
(defun +debugger-dape-cwd-function-fn ()
|
|
(or (let (projectile-require-project-root)
|
|
(projectile-project-root))
|
|
(dape--default-cwd)))
|
|
|
|
;; Mode-line serves no purpose in REPL window.
|
|
(add-hook 'dape-repl-mode-hook #'hide-mode-line-mode)
|
|
|
|
;; Persist breakpoints after closing DAPE.
|
|
(dape-breakpoint-global-mode +1)
|
|
|
|
;; HACK: Otherwise, if `dape-default-breakpoints-file's parent directory
|
|
;; doesn't exist, `dape-breakpoint-save' will throw an error.
|
|
;; REVIEW: This should be upstreamed.
|
|
(defadvice! +debugger--make-directory-a (&optional file)
|
|
:before #'dape-breakpoint-save
|
|
(make-directory (file-name-directory (or file dape-default-breakpoints-file)) t)))
|