Is it possible to debug the views (groovy templates) in Play framework?

648 views
Skip to first unread message

ogregras

unread,
Jul 24, 2011, 4:41:36 PM7/24/11
to play-fr...@googlegroups.com
Is it possible to debug the views (groovy templates) in Play framework?

Using Eclipse or Intellij IDEA, is there a way to set a breakpoint and debug the groovy templates?

I'm not sure about Eclipse, but I know IntelliJ is supposed to be able to debug .gsp pages.. Can it be used to debug the ".html" pages of Play framework containg groovy code?

Thanks in advance!

ogregras

unread,
Jul 26, 2011, 7:13:10 AM7/26/11
to play-fr...@googlegroups.com
Nobody to help a newbie?

I'm try to setup Play framework so I'm comfortable working with it, and debuging the templates is the only missing point for now...

ogregras

unread,
Jul 26, 2011, 7:13:57 AM7/26/11
to play-fr...@googlegroups.com
I'm *trying*

GrailsDeveloper

unread,
Jul 26, 2011, 8:17:56 AM7/26/11
to play-framework
As far as I know it's not possible. It's one advantage of JAPID that
you there can debug the java-code. But I didn't try it.
Niels

On 26 Jul., 13:13, ogregras <ogreg...@gmail.com> wrote:
> I'm **trying**

冉兵

unread,
Jul 26, 2011, 9:30:27 AM7/26/11
to play-fr...@googlegroups.com
Yes you can debug the generated Japid Java code as you would do with plain Java code. But if the templates compile they will just work most of the times.

Bing



2011/7/26 GrailsDeveloper <openso...@googlemail.com>
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


ogregras

unread,
Jul 26, 2011, 4:57:05 PM7/26/11
to play-fr...@googlegroups.com
Thanks for the help, I'll try Japid for sure!


Mikael

unread,
Oct 25, 2011, 3:40:44 AM10/25/11
to play-fr...@googlegroups.com
I noticed an interesting behaviour in eclipse today.

I created a class CurrencyExtensions which extends JavaExtensions.
This class is used in my templates to format currencies and other things.

Now when I debug Play! and step through the extension methods, upon exiting this method, eclipse switches to the Groovy template and allows you to step though the actual template and check all the variables.

I thought this might be useful to share if that's not a well know fact.


sas

unread,
Oct 25, 2011, 8:23:28 AM10/25/11
to play-framework
I asked the very same question long time ago, and the answer was that
it wasn't possible

remember that views should be kept as simple as possible

more over, if you have something more complex or performance critic,
you could develop it as a fastTag, with java, and there you'll be able
to debug everything without a problem

see this article http://playframework.wordpress.com/2010/11/26/fasttags-in-play/

and this SO question

http://stackoverflow.com/questions/4284208/why-would-i-want-to-use-fast-tags-over-groovy-tags-in-play

saludos

sas

Mikael

unread,
Oct 26, 2011, 1:45:45 AM10/26/11
to play-fr...@googlegroups.com
I know it is not supposed to be possible but it actually is!
 Hence me posting this which I thought was an 'interesting' behaviour.
Reply all
Reply to author
Forward
0 new messages