Is there any way to debug Grails application deployed to production server in Intellij IDEA or any other IDE?
You need to start your server in debug mode by adding something like this to the java process start script:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Then in IntelliJ open Run > Edit Configurations
and select Defaults > Remote
, where you can set the port you specified above to debug the remote JVM.
You can do the same in Eclipse.
Also you can use grails-debug run-app
to debug Grails application. But I think it's not good choice for production
Also, starting from grails 2.3.0 the jvm is forked into the build vm and the application vm. Using --debug
allow you to debug the build vm, and using --debug-fork
allows you to debug the app vm. Grails 2.3 forked execution
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