cursive icon indicating copy to clipboard operation
cursive copied to clipboard

Clojure debugger doesn't stop on breakpoint

Open zeafynx opened this issue 7 years ago • 13 comments

I'm using: OS X 10.11.6 Intellij IDEA 2017.2.2 Cursive 1.6.1-2017.2

I would like to debug the following code "test.clj". The breakpoint is at the line of "print".

(defn foo []
  (print "hello"))

(foo)

I tried both methods below to debug:

  1. Click "Run" -> "Debug 'test'". Here is the output:
Connected to the target VM, address: '127.0.0.1:51992', transport: 'socket'
hello
Disconnected from the target VM, address: '127.0.0.1:51992', transport: 'socket'

Process finished with exit code 0

The program doesn't stop at the breakpoint.

  1. Run the REPL in debug mode. The program doesn't stop.

Do I miss anything when using Clojure debugger?

zeafynx avatar Aug 20 '17 02:08 zeafynx

I am experiencing the same problem. I must add that before the debug console shows any info, the whole IDE is frozen for a few seconds

marian-c avatar Oct 03 '17 17:10 marian-c

Workaround if anyone finds this issue via search as I did

You should use JDK 8 and not JDK 9

After trying older versions of this plugin without success, I tried older versions of the JDK and it seems to do the trick, my exact versions:

  • not working Zulu Java 9 OpenJDK 9.0.0
  • working Zulu Java 8 OpenJDK 8u144

marian-c avatar Oct 04 '17 17:10 marian-c

Hmm, that's worrying, thanks for the report. @zeafynx Are you using JDK9 too?

cursive-ide avatar Oct 05 '17 00:10 cursive-ide

@cursive-ide No, here is my JDK info:

$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

zeafynx avatar Oct 05 '17 02:10 zeafynx

Yes, JDK 9.0.1 is a problem as well. Downgrading to JDK 8u152 on OSX solved the issue.

mavrukin avatar Dec 26 '17 17:12 mavrukin

Hi, I can confirm this JDK 9 issue on Windows as well. Downgrade to JDK 8u152 worked. Message when hovering over the breakpoint was: "breakpoint doesn't belong to any class"

IDEA 2017.3.1

jonesn avatar Jan 11 '18 08:01 jonesn

same problem OS X 10.13.6 Intellij IDEA 2018.2.2 Cursive 1.7.0-2018.2

yangqiang avatar Oct 12 '18 07:10 yangqiang

Hi Everyone, I'm having exactly the same issue ... Meaning it doesn't stop on breakpoints when I launch the debugger.

OSX 10.14.6 Intellij IDEA 2019.3.2 Cursive 1.9.1-eap2-2019.3

I tried JAVA 8 and JAVA 11 ... Same issue .. Any idea ?

When I go into the "View Breakpoints" window .. I can see my breakpoints and they seem OK.

FYI I'm running Clojure 1.10.1 and jdk1.8.0_192

mathvdh avatar Jan 26 '20 21:01 mathvdh

I'm still seeing this with Java 11 and latest Cursive. My breakpoints are greyed out. Running with the nREPL with Intellij classpath

adam-krieg avatar Jun 19 '20 17:06 adam-krieg

I'm still seeing this in the latest Cursive, as soon as I click to create a breakpoint the red dot turns into a greyed out ⌀ with the hover text "No executable code found at line ... in class"

Hendekagon avatar Feb 06 '21 10:02 Hendekagon

I just started having the same issue as @Hendekagon after upgrading to Intellij 2021.1.1 and Cursive 1.10.2. I'm using Java 11. A few breakpoints work, but most get greyed out with "No executable code found" and do not trip when running tests from the built-in debug repl, nRepl+leiningen.

Breakpoints in the test file itself seem to work, but the ones in other files, in the code under test, don't seem to most of the time.

Magisus avatar May 13 '21 23:05 Magisus

also getting "no executable code" on Intellij 2022.1.2, Cursive 1.12.4-2022.1 when trying to set a breakpoint in protocol implementation

antonmos avatar Jun 10 '22 15:06 antonmos

~~Any news on this? Ability to debug using breakpoints would really mean a lot...~~

Actually, it turns out the debugger sometimes does stop on the breakpoint which was marked as "no executable code". But it's inconsistend, e.g. it stops on a (println ...) call, but not on (let [...] ...).

vincent-dm avatar Feb 15 '24 14:02 vincent-dm