title: How to debug a Gradle build.gradle file (in a debugger, with breakpoints)?
body: <p>Is there a tool that will allow me to set breakpoints in a build.gradle file and step through tasks in a debugger?</p>
  
  <p>Note:  I believe that I'm asking a different question than similar stackoverflow questions about debugging Gradle plugins, where (presumably) the intent is to step through custom Groovy or Java plugin code located in a separate file.  I want to set a breakpoint in a Gradle task in a simple build.gradle file, like...</p>
  
  <pre><code>task example {
     println "I want to set a breakpoint here"
  }
  </code></pre>
  
  <p>...so that when I run <code>gradle example</code> I can inspect the context in a debugger.</p>
  
  <p>(For those who would point me to IntelliJ...although JetBrains' website advertises that they support debugging Gradle scripts in IDEA UI, AFAICT this is untrue, as this was reported broken in IDEA13 EAP and hasn't been fixed in IDEA14. See <a href="https://stackoverflow.com/questions/22017433/debugging-gradle-build-files-in-intellij-android-studio">Debugging Gradle build files in Intellij / Android Studio</a> )</p>
  
  <p>Is there any debugging tool that allows me to set a breakpoint in a build.gradle file, or is there something about the Gradle DSL that makes it fundamentally impossible to set breakpoints in a task such as my example, above?</p>