Grails: debugging GSP
October 22nd, 2010 by Sergey EvdokimovNow IntelliJ IDEA X is able to debug GSPs. You can set breakpoints and view variable values or evaluate expressions.
Now IntelliJ IDEA X is able to debug GSPs. You can set breakpoints and view variable values or evaluate expressions.
October 22nd, 2010 at 7:29 am
When you post feature items like this for upcoming releases it would help to put the EAP version its applicable to.
October 22nd, 2010 at 7:51 am
Good advice!
This feature is available in last EAP of IDEA X (98.187)
October 22nd, 2010 at 8:29 am
Wow! This is an ever desired feature of mine. Looking forward to see it in the next version. Nice nice…
November 4th, 2010 at 2:52 pm
Very nice!
November 9th, 2010 at 11:52 pm
I tried with version 98.311 and the debugger did not stop in the GSP.
November 10th, 2010 at 6:34 am
Dierk Koenig,
Now debugger stops at expressions like ‘${…}’ only. Did you set breakpoint to expression like ‘< % ... %>‘?
January 19th, 2011 at 10:34 am
I’m using 10.0.0.1 and for me it’s not working.
I’ve set the breakpoint at ‘${…}’, but the only thing what is happening:
IDEA doesn’t stop - browser doesn’t stop running, it loads and loads and loads (FF) - IDEA consumes the whole CPU - only a restart of IDEA helped!!!
January 29th, 2011 at 10:35 pm
Just confirmed the same as Charlie with IDEA 10.0.1 It won’t stop on the breakpoint, goes into an endless loop and requires a restart of IDEA to break out of that situation.
February 1st, 2011 at 11:08 pm
I had to come back and report that after being contacted by Sergey at Jetbrains, I tried to reproduce the problem. He asked for the GSP that was causing problems and I went about trying to figure out which GSP it was so I could send it to him.
I tried about 50% of the pages in my app and not once could I reproduce the situation I mentioned above on Jan 29. It’s only been a few days and I didn’t change much, if any, code between Jan 29 and today. The only significant event between those two dates was that I rebooted my machine.
On Jan 29, I could not get this feature to work at all. Today, I cannot reproduce the problem and IDEA stops on any breakpoint I set, on any GSP.
If I can reproduce the problem, I’ll come back to report my results, but for now, I’ll chalk it up to some weird environmental thing.
Being able to stop on a breakpoint in a GSP is really nice for some problems. I’m looking forward to using this feature.
February 2nd, 2011 at 4:36 am
If the problem appears again attach the stacktrace, please. (You can get it using command ‘jstack’)