Sung Kyong Park
Sung Kyong Park

Reputation: 1

How can i debugging gradle file(except build.gradle) in IntelliJ?

I want to debug my gradle task in test.gradle which is not in build.gradle in IntelliJ IDEA.

Like this, test.gradle file debugTestwithGradle task in test.gradle

So, I tried remote debugging follow these guides.

But these guide does not work for me.

Is there any solution to debug gradle script?

Upvotes: 0

Views: 562

Answers (1)

Piotr Kucia
Piotr Kucia

Reputation: 381

To debug gradle scripts, you just need to set the following VM option:

-Dorg.gradle.debug=true

And then attach debugger to standard port 5005.

See details here: https://docs.gradle.org/current/userguide/troubleshooting.html#sec:troubleshooting_build_logic

there is even an example how to do it in IntelliJ Idea:)

Upvotes: 1

Related Questions