Add realgud-jdb [not working]

This commit is contained in:
Jeremy Dormitzer 2023-11-06 13:33:16 -05:00
parent 8e150aab98
commit 7147a2913c

View File

@ -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)