Fork me on GitHub

@cfleming When I stop at a breakpoint, I can evaluate constants like 123, but I can't evaluate variables or expressions with variables. It's like they are invisible to the evaluator. I have a list of variables in IDEA, but they can't be evaluated. I run IntelliJ IDEA 2019.3.4 Community edition, Cursive I have tried both JDK 1.8.0_241 and JDK 11.0.6 but nothing works.


That looks like, which is fixed in the latest EAP series but hasn't made it into a stable build yet. I hope that will be soon.


Can you share how the "Interrupt Current Evaluation" is implemented?


Sure, currently this only works for nREPL, and it just sends the nREPL interrupt op. On the server side, nREPL starts a new thread for each eval, and uses Thread.stop() to kill them.


Thanks! I was overoptimistically hoping for some solution that didn't involve Thread.stop(). :)


The problem is that there is no general solution that doesn't use that.


I've seen a lot of complaints about its use, and lots of dire warnings, but the simple fact is that there's no alternative except not allowing interrupts at all (or just interrupting the thread, which will not work for runaway evaluations). The main issue with Thread.stop() is that it will leave dangling object monitors, but that's not really an issue for a lot of dev use cases, and I'm sure no-one is REPLing into prod.


Yeah, I wasn't complaining. I was just hoping there was some other mechanism that I didn't know about.


No, sadly there is no magic :)