From 7147a2913cd38a12b3b3982d949c5a2a82e4af73 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Mon, 6 Nov 2023 13:33:16 -0500 Subject: [PATCH] Add realgud-jdb [not working] --- emacs/.emacs.d/config/init-ide.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/config/init-ide.el b/emacs/.emacs.d/config/init-ide.el index a94d099..f7b0572 100644 --- a/emacs/.emacs.d/config/init-ide.el +++ b/emacs/.emacs.d/config/init-ide.el @@ -214,7 +214,21 @@ ;; Debugger interface (use-package realgud - :defer t + :defer t) + +(use-package realgud-jdb + :commands realgud:jdb-maven :config + (defun realgud:jdb-maven () + "Runs realgud:jdb, setting the classpath from Maven." + (interactive) + (let ((default-directory (project-root (project-current)))) + (when (not (locate-dominating-file default-directory "pom.xml")) + (user-error "Not a Maven project.")) + (with-env `(("CLASSPATH" . + ,(s-trim + (shell-command-to-string + "mvn -q exec:exec -Dexec.executable=echo -Dexec.args=\"%classpath\"")))) + (call-interactively #'realgud--jdb))))) (provide 'init-ide)