"-Dorg.gradle.debug=true" does not do anything in Gradle 2.8


The flag -Dorg.gradle.debug=true worked perfectly in Gradle 2.5. I recently upgraded to 2.8, but this flag doesn’t seem to work anymore: if I do gradle someTask -Dorg.gradle.debug=true, the build doesn’t stop to wait on port 5005.

Is it a bug or you changed/removed this feature?

Thank you so much for your help! :blush:


1 Like

It seems this one works in Gradle 2.8:

gradle someTask -Dorg.gradle.jvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5010"

But I suspect it’s a bug: I didn’t spend too much time debugging, but this line seems to overwrite JvmOptions.debug. Also, if I use port 5005 (the default) on the command line above, the trick doesn’t work anymore and the whole debug settings are ignored (I guess because of this).

So, am I missing something or I should just give up on the good old -Dorg.gradle.debug=true?

Thank you!

Thanks for reporting this, Andrea. I can confirm that this broke starting with 2.7. We’ll look at providing a fix for this.

This will be fixed in Gradle 2.9.

1 Like