From fd55e5f26783227e32ed1874367fcfc28b1873ae Mon Sep 17 00:00:00 2001 From: Cartmanishere Date: Sat, 10 Apr 2021 15:22:47 +0530 Subject: [PATCH] Reset *skip-breaks* in dbg when first breakpoint --- CHANGELOG.md | 3 +++ src/cider/nrepl/middleware/debug.clj | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab6efe1f..33dd15b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## master (unreleased) +### Bugs Fixed +* [#695](https://github.com/clojure-emacs/cider-nrepl/pull/695): Fix debugger quit for http handler functions + ## 0.25.10 (2021-04-08) ### Bugs Fixed diff --git a/src/cider/nrepl/middleware/debug.clj b/src/cider/nrepl/middleware/debug.clj index a9064922..a7390a23 100644 --- a/src/cider/nrepl/middleware/debug.clj +++ b/src/cider/nrepl/middleware/debug.clj @@ -501,8 +501,12 @@ this map (identified by a key), and will `dissoc` it afterwards."} response with `read-debug-command`'." [coor val locals STATE__] (if-let [first-coor @(:session-id STATE__)] + ;; Check if the instrumented function is being evaluated + ;; from the root again. (when (= first-coor coor) - (reset! (:skip STATE__) false)) + ;; Clear any previously set skip state. + (reset! (:skip STATE__) false) + (skip-breaks! false)) (reset! (:session-id STATE__) coor)) (cond (skip-breaks? coor STATE__) val