Debugging a gradle project with IntelliJ does not stop on breakpoints when running unit tests

2,984 views
Skip to first unread message

Paulo Lopes

unread,
Dec 12, 2013, 6:47:27 AM12/12/13
to ve...@googlegroups.com
Hi,

I'm using Linux, and IntelliJ 12 and imported the gradle template directly from IntelliJ (open the build.gradle file)

And now i notice that if i put a break point on a unit test and run the gradle check in debug mode from the jetgradle plugin the IDE never stops on my breakpoints. Does anyone experience this?

My specs are:

Ubuntu 12.04 64bit
Oracle JVM
IntelliJ 12

I am quite sure it used to work before...

Any ideas?
Thanks!

Randall Richard

unread,
Dec 12, 2013, 8:30:46 AM12/12/13
to ve...@googlegroups.com
Hello Paulo, not sure why it's not working directly in IntelliJ, but the way I debug my gradle template project via IntelliJ is by using a Remote run configuration.  I fire up the vertx process using the command line gradle target with the environment variable GRADLE_OPTS set to the IntelliJ debug args (you can copy / paste from the Edit Configurations panel).  When you run the IntelliJ Remote config and it will connect to the running process where you can use the full debugger functionality.

FYI, I know there are some gurus on this list that feel debuggers are for wimps (i.e. they prefer "println" debugging).  ;o)

HTH

-Randall


--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Brice Dutheil

unread,
Dec 12, 2013, 9:10:22 AM12/12/13
to ve...@googlegroups.com
Yeah IntelliJ support for gradle is somewhat simplistic ...at most

That's a shame considering a lot of OSS projects are using gradle.

I personally use the same tip (GRADLE_OPTS). Also the task runModIDEA just doesn't work when launched from IDEA, I believe there's something wrong with the paths used to run vert.x from gradle integration in IntelliJ.

-- Brice

Tim Yates

unread,
Dec 12, 2013, 9:13:18 AM12/12/13
to ve...@googlegroups.com
Not tried it, but 13 is supposed to have much improved gradle support


As I say, I've not tried it though, YMMV

Paulo Lopes

unread,
Dec 12, 2013, 9:31:22 AM12/12/13
to ve...@googlegroups.com
Yes 13 is supposed to be better but my license is for 12 ;( so I still need to save some bucks for buying the next one :)

Brice Dutheil

unread,
Dec 12, 2013, 9:35:38 AM12/12/13
to ve...@googlegroups.com
I am using IntelliJ 13, and well I find this new support not compelling at all. 
...and I don't believe I am using it wrong.

-- Brice

André Pinto

unread,
Dec 13, 2013, 5:05:11 AM12/13/13
to ve...@googlegroups.com
I'm able to run the runModIDEA task from within IntelliJ IDEA. The only reason why I'm not using it is because of an incompatibility with AspectJ's load time weaver and Gradle's bootstrap class loader, which I wasn't able to circumvent.

However, I agree IntelliJ's support for Gradle is far from perfection. I just hope the improvements introduced in version 13 fix some of the issue I've been having (like having to invalidate the IDE cache to avoid running old versions of the code even after clean install).
Reply all
Reply to author
Forward
0 new messages