Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debugger quit for http handler functions #695

Merged
merged 1 commit into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/cider/nrepl/middleware/debug.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add some explanatory comments here, so this part of the code is easier to understand for future readers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll add comment.

(reset! (:session-id STATE__) coor))
(cond
(skip-breaks? coor STATE__) val
Expand Down