I found the following instructions on another site.
In Intellij, go to "Run / Edit Configurations", press +, then "Remote" and name it whatever you want (example "Grails Remote"), then click ok.
Then from the command line do:
grail run-app --debug-fork
, "Grails Remote". .
grails-app/conf/BuildConfig.groovy
grails.project.fork = [
test: false,
run: false
]
grails docs