Starting Jetty in debug mode with Gradle

May 17, 2011   #build  #gradle 

You can add the Jetty plugin to your gradle build file. Then you are able to start Jetty with your application by running gradle jettyRun.

If you want to be able to debug your application remotely, just set your GRADLE_OPTS to GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n" before starting Jetty. Jetty will then listen on the specified port for incoming remote debugging connections.