cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
588 stars 7 forks source link

Clojure debugger doesn't stop on breakpoint #1833

Open zeafynx opened 7 years ago

zeafynx commented 7 years ago

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.

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

Do I miss anything when using Clojure debugger?
marian-c commented 7 years ago

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 commented 7 years ago

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:

cursive-ide commented 7 years ago

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

zeafynx commented 7 years ago

@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)
mavrukin commented 6 years ago

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

jonesn commented 6 years ago

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

yangqiang commented 6 years ago

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

mathvdh commented 4 years ago

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

adam-krieg commented 4 years ago

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

Hendekagon commented 3 years ago

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"

Magisus commented 3 years ago

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.

antonmos commented 2 years ago

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

vincent-dm commented 8 months ago

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 [...] ...).