Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug deployed Grails application

Is there any way to debug Grails application deployed to production server in Intellij IDEA or any other IDE?

like image 979
Yarovoy Avatar asked Jan 17 '11 11:01

Yarovoy


3 Answers

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.

like image 99
Martin Dow Avatar answered Nov 10 '22 00:11

Martin Dow


Also you can use grails-debug run-app to debug Grails application. But I think it's not good choice for production

like image 31
fedor.belov Avatar answered Nov 10 '22 00:11

fedor.belov


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

like image 41
alfredozn Avatar answered Nov 10 '22 00:11

alfredozn