Reputation: 15929
I am trying to debug a Grails 3.x application using grails run-app --debug-fork
. But when the application starts it does not wait for the debugger to attach. Any solution on how to debug a Grails 3.x application?
Upvotes: 13
Views: 5015
Reputation: 183
In IntelliJ IDEA 2016.1, I create two configurations. This allows me to make solid use of all the context menus, etc. that IntelliJ IDEA offers. Here's how:
run-app --debug-jvm
Listening for transport dt_socket at address: 5005
. Grails application running at http://localhost:8080 in environment: development
.Success!
Upvotes: 3
Reputation: 5060
In IntelliJ you can right click the Gradle task bootRun
and select Debug.
Upvotes: 11
Reputation: 9281
The other option is to directly run the Application
class located in grails-app/init
. It has a static void main
and be run as a regular application. You can run it directly from your IDE with a debug profile.
Upvotes: 3
Reputation: 613
Please use the --debug-jvm
flag.
For example: grails --debug-jvm run-app
Upvotes: 20