The reason seems to be another new forked execution feature shipping with the Grails 2.3.0 Version. The gentle reader might get some background information what it's all about from this blog post by Graeme Rocher.
So if you are encountering the same problem, here is a quick fix in your BuildConfig.groovy settings to disable the forked execution and make your breakpoints work again. I got this working solution by this discussion.
The grails.project.fork config parameter to the rescue. Just set the values for test and run to false to disable forked execution like this and do a restart.
grails-app/conf/BuildConfig.groovy
grails.project.fork = [
test: false,
run: false
]
test: false,
run: false
]
Other tips like appending --debug-fork to the run-app command had no effect on my project. Would be nice if you drop me a message which solution worked for you.
Don't panic and happy debugging!
Great article and perfect solution. Thanks a bunch!
ReplyDeleteYour solution solved my problems. Thanks a buch, all frameworks have a learning curve and this was starting to become quite frustrating!
ReplyDeleteWorks for us. Thanks for that!
ReplyDeleteyahoo! that was my solution Grails 2.4.2
ReplyDelete--debug-fork dont work for me too...! i think your proposed soln is the way to go.
ReplyDeleteThanks
Thanks Bro
ReplyDeleteThanks for your comments! This shows me a lot of people having still trouble with breakpoints.
ReplyDeletethanks for this!
ReplyDeleteHi,
ReplyDeleteThanks a lot... works sweet.. only a problem though.. using this causes problem in loading external config file.
Is there any way around ...
Sadly, with grails 2.5 and intellij 14.1, grails wont run with run: false - it gives exceptions in spring. It will run with forked mode, but as you say, its impossible to debug, even with --debug-fork
ReplyDelete