cursive-ide / cursive

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

Cursive plugin freezing remote debugger. #1467

Open JeremyBetts opened 8 years ago

JeremyBetts commented 8 years ago

Hello,

First thanks for developing this great plugin. We have been using it since the early betas and it has been a very good tool for Clojure development.

I recently ran into an issue where the remote debugger in IntelliJ freezes. I did a lot of tests (starting with a clean install of intellij on a new laptop) and step by step setup my environment and tested debugging at each step until the problem occurred.

my discovery was that debugging works until the cursive plugin is installed and a breakpoint is place in the Clojure code.

We have an existing java application and we AOT compile Clojure into a jar that is deployed as part of the project in tomcat. We extensively use java interoperation. (we rewrote part of our existing codebase in clojure)

When I place a break point only in java code I can connect and debug fine.

When I place a break point in the Clojure code, the debugger will connect and then freezes. The application also freezes and its only once I force close the debugger that the application will unfreeze. I’ve been using the cursive plugin for a long time and the remote debugging has always worked. I did recently upgrade the plugin. I don’t remote debug every day though so I’m not precisely sure when the issue was introduced.

JeremyBetts commented 8 years ago

Also, when there are no break points in the clojure code, it is possible to step into the clojure code by placing a breakpoint in a java method that clojure calls and then stepping through the clojure code from there. It is simply placing a breakpoint in the clojure code that causes the debugging session to freeze

cursive-ide commented 8 years ago

Thanks for the kind words, I'm glad you're liking Cursive!

When the whole UI freezes, the best thing to diagnose it are thread dumps. See here for some info on how to get one, you should have some automatically-created ones. Please either attach them here or email them to cursive@cursive-ide.com.

JeremyBetts commented 8 years ago

@Hi, the IDE is not freezing the debugging session is getting hung. I will email the stack trace though. By application, I mean the application being debugged.

JeremyBetts commented 8 years ago

FYI the thread dump from the application shows most thread in this state "[ JVM locked by VM (w/poll advisory bit) waiting on some_ObjLock, polling bits: safep jvmti ]"