Grails: debugging GSP

Now IntelliJ IDEA X is able to debug GSPs. You can set breakpoints and view variable values or evaluate expressions.

This entry was posted in Tips & Tricks and tagged , , , . Bookmark the permalink.

10 Responses to Grails: debugging GSP

  1. Ted Wise says:

    When you post feature items like this for upcoming releases it would help to put the EAP version its applicable to.

  2. sergey.evdokimov says:

    Good advice!
    This feature is available in last EAP of IDEA X (98.187)

  3. Sven Lange says:

    Wow! This is an ever desired feature of mine. Looking forward to see it in the next version. Nice nice…

  4. Dierk Koenig says:

    I tried with version 98.311 and the debugger did not stop in the GSP.

  5. Sergey Evdokimov says:

    Dierk Koenig,
    Now debugger stops at expressions like ‘${…}’ only. Did you set breakpoint to expression like ”?

  6. Charlie says:

    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!!!

  7. Michael Morett says:

    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.

  8. Michael Morett says:

    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.

  9. Sergey Evdokimov says:

    If the problem appears again attach the stacktrace, please. (You can get it using command ‘jstack’)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">