branch: externals/dape
commit 6fd77fb49a19fb7339a63691386d3696da3b6cea
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Add REPL command eval to force variable response in "repl" context
---
dape.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dape.el b/dape.el
index 9addf2cb96..b1f551c2e0 100644
--- a/dape.el
+++ b/dape.el
@@ -695,6 +695,7 @@ left-to-right display order of the properties."
("breakpoints" . dape-repl-breakpoints)
("scope" . dape-repl-scope)
("watch" . dape-repl-watch)
+ ("eval" . dape-repl-eval)
("restart" . dape-restart)
("kill" . dape-kill)
("disconnect" . dape-disconnect-quit)
@@ -4884,6 +4885,12 @@ If EXPRESSION is non blank add or remove expression to
watch list."
(dape-watch-dwim `(,(string-join expression " "))))
(dape--repl-insert-info-buffer 'dape-info-watch-mode))
+(defun dape-repl-eval (&rest expression)
+ "Evaluate EXPRESSION in REPL buffer."
+ (dape-evaluate-expression (dape--live-connection 'last)
+ (string-join expression " ")
+ "watch"))
+
(define-derived-mode dape-repl-mode comint-mode "REPL"
"Major mode for interacting with Dape and the debugger.
Uses the interface provided by `comint-mode'."