grails 3 debug button disabled - workaround suggested by docs doesn't achieve same functionality


The debug button is disabled for Grails 3, providing no easy way to issue a "grails run-app" command in debug mode.  The UI provides no explanation.  


The information for "Debugging Grails 3 Application" at does not actually provide the same functionality.  


After much investigation, I found a way to achieve the lost functionality.  It requires creating 2 different entries in the Run/Debug Configurations pulldown menu:


 (entry 1) invoke Grails run-app with a --debug-jvm flag

(entry 2) attach a debugger to it  

I suspect this is exactly what happens behind the scenes when the debug button is clicked for a Grails 2.x app.


Comment actions Permalink

Nope, it's not what happens with Grails 2. Grails 2 has the possibility to pass vm arguments to forked instance and Grails 3 doesn't.
You still have two choices for debugging. What do you mean by "same functionality"?

Comment actions Permalink

The docs explain how to launch it as a regular java app via the main() method which doesn't provide the Grails goodness of "grails run-app" which provides "hot-swap" class reloading, etc.  In addition to that approach, I am able to

1) grails run-app --debug-jvm

2) then use IntelliJ to attach a debugger to the "remote" instance I just launched.  

It is by combining these 2 steps that I am able to recreate for my Grails 3 app the same functionality that IntelliJ provides  out of the box for Grails 2.x apps when the developer clicks the debug button for the "run-app" command.

Comment actions Permalink

Try to add "-noverify" to jvm args in Application.main() run configuration

Comment actions Permalink

tried it.  that doesn't cast the "run-app" magic


Here's somebody else who came up with another workaround in addition mine above.


What I'm saying is: it would be nice if IntelliJ had this feature out-of-the-box.




Please sign in to leave a comment.