# How to debug a Gradle plugin?

**URL:** <https://discuss.gradle.org/t/how-to-debug-a-gradle-plugin/24925>\
**Category:** Help/Discuss\
**Tags:** plugins\
**Created:** [November 27, 2017, 11:36pm UTC](https://discuss.gradle.org/t/how-to-debug-a-gradle-plugin/24925 "2017-11-27T23:36:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drfreaky](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@drfreaky](https://discuss.gradle.org/u/drfreaky)\
**Post date:** [November 27, 2017, 11:36pm UTC](https://discuss.gradle.org/t/how-to-debug-a-gradle-plugin/24925/1 "2017-11-27T23:36:54Z")

</div>

I use a 3rd party Gradle plugin in my build script which seems to have a bug. Now I want to debug it by setting breakpoints in the source code of the plugin.  
I start my application (which uses the plugin) with `GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" && ./gradlew jar`. I have created a remote configuration in Intellij to connect to the application. The problem is that after I have ran this configuration my app just finished. How can I set the breakpoints? I have tried several things like importing the plugin jar in Intellij and set the breakpoints but they are always getting ignored… ;(
