# Debug Gradle

**URL:** <https://discuss.gradle.org/t/debug-gradle/5272>\
**Category:** Old Forum Archive\
**Created:** [March 2, 2015, 1:49pm UTC](https://discuss.gradle.org/t/debug-gradle/5272 "2015-03-02T13:49:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![griefer](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@griefer](https://discuss.gradle.org/u/griefer)\
**Post date:** [March 2, 2015, 1:49pm UTC](https://discuss.gradle.org/t/debug-gradle/5272/1 "2015-03-02T13:49:00Z")

</div>

Hello, I have Gradle built locally. I am using the gradle.bat from the gradle home dists directory and have a breakpoint set in gradle\subprojects\wrapper\src\main\java\org\gradle\wrapper\Install.java. When i run:

```gradle
gradle\wrapper\dists\gradle-2.4-20150219230028+0000-binr7io5nnj0qywdk93t9mzvtqf\gradle-2.4-20150219230028+0000\bin\gradle.bat wrapper --no-daemon -Dorg.gradle.debug=true

```

The debugger connect but doesnt stop at the breakpoint in that file.

Is there a special task i need to execute when building gradle to be able to step through the code? Thanks

---

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [March 2, 2015, 3:39pm UTC](https://discuss.gradle.org/t/debug-gradle/5272/2 "2015-03-02T15:39:00Z")

</div>

This has been discussed [here](http://forums.gradle.org/gradle/topics/how_do_you_attach_a_debugger_to_gradle_so_that_i_can_debug_it_running_a_task)

---

<div class="post-metadata">

**Author:** ![griefer](https://avatars.discourse-cdn.com/v4/letter/g/a183cd/32.png) [@griefer](https://discuss.gradle.org/u/griefer)\
**Post date:** [March 2, 2015, 5:13pm UTC](https://discuss.gradle.org/t/debug-gradle/5272/3 "2015-03-02T17:13:00Z")

</div>

After setting GRADLE\_OPTS (without quotes on windows) and adding the source root for the project I am interested in to netbeans, I can set a breakpoint and step through the source. Thanks
