Skip to content

Commit 43c6727

Browse files
committed
Handle thread states better
1 parent 84147b3 commit 43c6727

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dap-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,8 @@ thread exection but the server will log message."
807807
(run-hooks 'dap-session-changed-hook))))
808808
("stopped"
809809
(-let [(&hash "threadId" thread-id "type" "reason") body]
810-
(puthash thread-id type (dap--debug-session-thread-states debug-session))
810+
(puthash thread-id (or type reason)
811+
(dap--debug-session-thread-states debug-session))
811812
(dap--select-thread-id debug-session thread-id)
812813
(when (string= "exception" reason)
813814
(dap--send-message

dap-ui.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ DEBUG-SESSION is the debug session triggering the event."
630630
callback
631631
(-map
632632
(-lambda ((thread &as &hash "name" "id"))
633-
(let* ((status (s-capitalize (or (gethash id thread-states) "running")))
634-
(stopped? (string= status "Stopped")))
633+
(let* ((status (s-capitalize (gethash id thread-states "running")))
634+
(stopped? (not (string= (s-downcase status) "running"))))
635635
(list
636636
:label (concat (propertize name
637637
'face (if (and (eq session (dap--cur-session))

0 commit comments

Comments
 (0)