Grails 2.0 reloaded classes can't be debugged

I'm very new to Grails so I'm not sure if this is a Grails 2.0 problem or a Grails problem in general.

I'm developing a Grails 2.0 application,and running it in Debug mode. If I change a class (with the very latest 11.0.1 build) it correctly recompiles and the class is correctly reloaded. But debugging stops working for that class. Existing breakpoints no longer get hit and new breakpoints don't work either. I'm assuming that IntelliJ is still holding a reference to the old compiled code and setting breakpoints in there, not in the new compiled code.

Is there a workaround for this? Other then starting and stopping the application? Something I can do to cause IntelliJ to switch over to debugging the new compiled code?

6 comments

Does it occur in all classes in your application?
Could you test debugging of very simple class?

0

It's a repeatable problem for controllers. I've tried with the default scope of controllers set to "prototype" and set to "singleton", neither work. I tried creating a new controller while the debugger was active and all lines in the controller were marked as non-executable even after I added lines, e.g,. "println 'hello'".

0

It's a repeatable problem for controllers. I've tried with the default scope of controllers set to "prototype" and set to "singleton", neither work. I tried creating a new controller while the debugger was active and all lines in the controller were marked as non-executable even

0

Service classes are similarly affected.

0

This appears to be reported as http://youtrack.jetbrains.net/issue/IDEA-74173 and is marked as fixed. It's still not working for me though.

0

This problem appears to be the result of a bad Grails global library. I created a new Grails global library and new project and the global libraries didn't match. The project with the new global library is debuggable.

0

Please sign in to leave a comment.