Mine's a multi-project gradle build and I tried:
$ export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,suspend=y,server=y"
$ gradle jettyRun
And that did NOT work. I even tried adding -Xnoagent to the GRADLE_OPTS setting above but that too did not make a difference. Also, setting JAVA_OPTS instead of GRADLE_OPTS did not solve the problem either. What solved the problem for me was adding a gradle.properties with:
org.gradle.jvmargs=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=5005,suspend=y
And immediately I could hit the breakpoint. May be solutions mentioned in other answers did not work for me because it is a multi-project build. Not sure!
Just wanted to provide the solution that worked for me in case above solutions do not work for other folks.
P.S: Tried with gradle 1.5/1.6 and adding the setting above to gradle.properties works for both versions!