2

I play a little with "Play" (I love this sentence) and tried to set up a breakpoint within the html file. Of course the eclipse editor has no such option, only bookmark text is available.

I also tried the eclipse plugin from codehouse but unfortunately it only supports groovy code in a java file.

Is there a possebility to set a breakpoint in html files and debug groovy code?
I'll be really thankful for any hint.

Short overview about my system:

  • eclipse 3.6
  • play 1.2.3
Andy Thomas
  • 84,978
  • 11
  • 107
  • 151
Tobias Sarnow
  • 1,076
  • 2
  • 12
  • 40
  • put he groovy code in a groovy file and you can put break points there.It should not be in HTML any way. – Shahzeb Oct 05 '11 at 21:38
  • 1
    The problem is that play works with html-files to present the web pages and there is groovy code inside. In my case there is no possibility to rename the file. It is also mixed with html content... – Tobias Sarnow Oct 05 '11 at 21:40
  • Workaround: http://stackoverflow.com/questions/11758688/debugging-groovy-scripts-running-in-a-scriptengine-from-eclipse/23511693#23511693 – Aaron Digulla Oct 30 '14 at 09:04

3 Answers3

0

In my opinion, that is not possible. You can debug whole the Java part but not the Groovy part that is compiled...

i.am.michiel
  • 10,281
  • 7
  • 50
  • 86
0

Unfortunately, it is not possible to set a breakpoint in an html file and expect it to be reached by the debugger. However, it is possible to set breakpoints in Groovy files.

Furthermore, if you install STS, then you can get the display view and expressions view working for Groovy stack frames.

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
0

I'm afraid that it's not possible to set a breakpoint in groovy template. The best way to debug is to refresh the page and check. It's troublesome but that's the only way. I believe that's one of the reasons the author is moving to Scala template in Play 2.0.

James
  • 1,436
  • 1
  • 13
  • 25
  • Thanks, that could be one reason of course, another one would be the performance I guess. Anyway I have to admit that there is no solution even STS with display view and expressions view are not helpful. – Tobias Sarnow Oct 11 '11 at 08:36