Skip to content

Instantly share code, notes, and snippets.

@mostlylikeable
Last active August 10, 2016 15:02
Show Gist options
  • Save mostlylikeable/9613ed3cd294364b285adc2c11f23df4 to your computer and use it in GitHub Desktop.
Save mostlylikeable/9613ed3cd294364b285adc2c11f23df4 to your computer and use it in GitHub Desktop.
gradle debug on different port
// grails -debug -DFOO=bar -Djava.awt.headless=true -Dapp.context=/ run-app
run {
if (project.hasProperty('debug') && project.property('debug') == 'true') {
def debugPort = project.hasProperty('debug.port') ? project.property('debug.port') : 5005
def suspend = project.hasProperty('debug.suspend') ? project.property('debug.suspend') : 'y'
jvmArgs '-Xdebug', "-Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=${debugPort}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment