Browse Source

Fix adding/removing breakpoints when the client is not connected

* indium-breakpoint.el (indium-breakpoint-remove, indium-breakpoint-add): Check
  if the client is connected before removing the breakpoint in the runtime.
tags/2.1.1
Nicolas Petton 1 year ago
parent
commit
a24b6a7637
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      indium-breakpoint.el

+ 4
- 2
indium-breakpoint.el View File

@@ -42,7 +42,8 @@ CONDITION is true."
(let* ((brk (indium-breakpoint-create :condition (or condition ""))))
(map-put indium-breakpoint--local-breakpoints brk (current-buffer))
(indium-breakpoint--add-overlay brk)
(indium-client-add-breakpoint brk)))
(when (indium-client-process-live-p)
(indium-client-add-breakpoint brk))))

(defun indium-breakpoint-edit-condition ()
"Edit condition of breakpoint at point."
@@ -56,7 +57,8 @@ CONDITION is true."
(defun indium-breakpoint-remove ()
"Remove all breakpoints from the current line."
(seq-doseq (brk (indium-breakpoint-breakpoints-at-point))
(indium-client-remove-breakpoint brk)
(when (indium-client-process-live-p)
(indium-client-remove-breakpoint brk))
(map-delete indium-breakpoint--local-breakpoints brk)
(indium-breakpoint--remove-overlay)))



Loading…
Cancel
Save