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?
Select "grails" in the list and select "new configuration" (blank paper icon). In the next window, select your grail project in the "project field". Write "run-app" in the grails commmand field. click "Apply" and click "Debug".
For debugging the app itself, starting from Grails 3 we can go to grails-app/init then right click on the Application. groovy class and click Debug 'Application' .
1.2 If you want to stop your server (and app), you can, at the grails prompt, enter 'stop-app', which will stop the server and app.
In IntelliJ you can right click the Gradle task bootRun
and select Debug.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With