From 9ecd6ba580ee49ef3804681369f09f7d2e7a9211 Mon Sep 17 00:00:00 2001 From: Daniel Pettersson Date: Sun, 31 Dec 2023 00:55:04 +0100 Subject: [PATCH] Use stdout from adapter in repl Adds output from dlv to console --- dape-tests.el | 2 ++ dape.el | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dape-tests.el b/dape-tests.el index 4e15dcb..163c3f7 100644 --- a/dape-tests.el +++ b/dape-tests.el @@ -101,6 +101,8 @@ Helper for `dape-test--with-files'." (string-match-p "\\*dape-.+\\*" (buffer-name buffer))) (buffer-list)))) + (dape-test--should + (not (process-list))) (advice-remove 'yes-or-no-p 'always-yes) ;; clean up files (delete-directory temp-dir t))))) diff --git a/dape.el b/dape.el index 80ea058..c316fa1 100644 --- a/dape.el +++ b/dape.el @@ -1691,11 +1691,17 @@ Starts a new process as per request of the debug adapter." :buffer buffer :sentinel 'dape--process-sentinel :filter (lambda (_process string) - (dape--debug 'std-server - "Server stdout:\n%s" - string)) + (dape--repl-message string)) :noquery t - :file-handler t)) + :file-handler t + :stderr + (make-pipe-process + :name "Dape adapter stderr" + :filter (lambda (_process string) + (dape--debug 'std-server + "Server stdout:\n%s" + string)) + :buffer buffer))) (dape--debug 'info "Server process started %S" (process-command dape--server-process)) ;; FIXME Why do I need this?