branch: externals/dape
commit 121ee721aa9b75de01e96705554af2793b30ddd1
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Prevent sending stopped when state is already stopped
This is not a complete fix if pause is sent while pause request is in
flight cpptools will still crash (with LLDB)
---
dape.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dape.el b/dape.el
index cb5334f319..751d313f24 100644
--- a/dape.el
+++ b/dape.el
@@ -1563,6 +1563,9 @@ Starts a new process as per request of the debug adapter."
(defun dape-pause ()
"Pause execution."
(interactive)
+ (when (equal dape--state "stopped")
+ ;; cpptools crashes on pausing an paused thread
+ (user-error "Thread already is stopped"))
(dape-request (dape--live-process) "pause" (dape--thread-id-object)))
(defun dape-restart ()