Debugging a grails3 app with eclipse

Debugging applications in eclipse is easy if you're able to run them as java application main class.


Grails3 can be started by using the Application.groovy main class, thanks to spring-boot.

I tried this, but it failed. I added the 'build' scoped libraries by adding the 'dist' folder from the grails installation to the run job classpath. It still failed (in my case) because the application.groovy was not being loaded.

The application.groovy is optional, the default application.yml was loading just fine.


The fix was to add the grails-app/conf folder also to the classpath. This makes the source file available to the running process instead of the compiled class. Spring-boot loads it and everything works ok!