Andre's Blog

20160216 How To Debug Gradle Scripts

[GRADLE]

To debug a gradle script, you have to connect a debugger with the running gradle process.

You have to set the environment variable GRADLE_OPT (like here in bash) :

export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"

and then start your task with the option --no-daemon.

Then you can connect to your gradle process using the remote configuration of intellij idea.

You create a remote configuration by clicking

Run / Edit Configurations... / + / Remote

Select where to go ...


The Blog
My Technical Blogs
Projects
Blogs Of Friends
RSS
CV/About
Me