-
Notifications
You must be signed in to change notification settings - Fork 177
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
Debugger stops working #460
Comments
I'm afraid in its current form this bug report is not actionable at all. |
I was hoping to start a dialogue, with stuff to try, to avoid sinking hours into creating a minimal repro. I'm so pressed at work that I don't have hours to sink into this. For now I've just taken the productivity hit by going back to using If nobody has any suggestions as to how to debug this, we should indeed just close this, until someone else comes along to spearhead this. |
At least - is this some recent regression or it has been a problem for a while? @vspinu did some changes on the debugger in 0.15, but no one has complained after it was released, so I assume this is something from 0.16, right? But we didn't really change anything except the deferred middleware loading there. |
I'm a bit more conservative about upgrading emacs packages at work than at home, so this is probably due to the changes in 0.15. I think this is related to threads, somehow. Perhaps the breakpoint information is imperfectly shared among threads? The reason I suspect this is that even after web-requests stop tripping breakpoints, I can get the debugger to start by instrumenting a function and calling it from the REPL. |
Maybe obvious, but if your complex system passes functions around (higher order fns, ring, transducers etc) then you need to instrument it before the start of the system. Hard to say what's going on, really. At the least please try to remember what was the last debug action before the breakage. It's rather strange that instrumentation stops working without any errors or messages. |
I just did the following, to reproduce the problem:
At this point the function has the red box around it (again) to indicate instrumentation, but the debugger is no longer triggered by web requests. nrepl messages associated with failed instrumentation:
I tried looking at the messages when it was working and when it wasn't, but the chatter looked identical. |
I see. I think this happens due to how Also with recent changes to the debugger the relevant #1054 could be finally implemented. Will try to have a look at all these but probably not before the new year. |
Your guess is spot on. If I only use n I can keep re-evaluating and using the debugger, but as soon as I hit c the debugger won't get triggered on subsequent web requests going through that function or any other. I've tagged the issues you mentioned. |
I had the same issue and found minimal reproduction steps and a work around. first an example without threads:
When I use This behavior is more likely to be to be annoying if the loop is being run on another thread that lasts the lifetime of your application.
In this example if I instrument My workaround is to bind
Now when I use |
I played around in Here are the functions I changed:
However this introduced another potentially annoying behavior. Now, if I use |
Here's a fork with @Toad-Racer's workaround benzenwen/cider-nrepl Hattip @Toad-Racer |
It's not hard but needs some careful consideration because all of the related issues (including clojure-emacs/cider#1054) need to be tackled simultaneously. At some point I will have a look (unless someone else beats me to it) but no clear idea when. I have in plan to resume some clojure projects in September and if this issue bugs me much I will give it a stab pretty soonish. |
This was marked as closed, but I'm still experiencing the issue with cider 0.20. I've created a repo to repo https://github.com/pjstadig/cider-debugger-stops-working. Based on my understanding of the issue, I'm not sure there is an easy fix. I would think maybe the best one could do is leave Another option would be to have the (instrumented?) code check if Aside from that, I guess one would have to find a way to manage state that doesn't involve bindings and atoms. Apologies if there's still on-going work on this, or if there are already better ideas (I know there's been discussion about it across several different issues). I may dig into this a bit more, so if there are any ideas about what should happen, I'd be interested in them. |
I cloned the repo from @pjstadig and followed the instructions, after adding I don't have a reproduction case - perhaps it's rather challenging to capture one, because it silently fails. If someone can give me advice on how to capture useful information about the state of the debugger, I will add more information here. CIDER 0.24.0snapshot (package: 20200208.809), nREPL 0.6.0 |
Expected behavior
Debugger keeps instrumenting stuff
Actual behavior
After a while (with no discernible pattern) the debugger stops working. I instrument functions, but the breakpoint doesn't trigger anymore. If I restart the REPL it starts working again.
Steps to reproduce the problem
I don't have time to create a minimal reproducible case. This happens in the (huge) system at work, when I'm sending web requests using
restclient-mode
to a version of our system running locally.Since web-requests might run on different threads, that might be related. I'm hoping this issue will give me some stuff to try, before I start re-creating a smaller version of the system.
Environment & Version information
;; CIDER 0.16.0snapshot (package: 20171001.112), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_151
Operating system
Ubuntu 16.04 LTS
The text was updated successfully, but these errors were encountered: