Oct 7th, 2010, 03:26 PM
Eclipse Groovy :Debug
I have installed STS 2.5.0.M3. Installed Groovy/Grails support. Everything went smoothly. Though I can start my app from STS, not able to debug. It does not stop at breakpoints. Went thro' several posts esp. 'Step Filtering' etc. Nothing worked. Help please...
Oct 11th, 2010, 10:47 AM
How did you start your app? It sounds like you did not start your app in debug mode.
The preferred way of starting your app in debug mode is selecting your project, right-click and choosing debug as -> Grails command (run-app).
Oct 11th, 2010, 11:35 AM
I did start in Debud mode. Exactly the way you mentioned. However, it does not stop at break points.
Oct 11th, 2010, 03:44 PM
I am going to need a little more information, then.
What are the file and line number that you set the breakpoint(s) at? (It would be helpful to attach something.)
Can you create a simple groovy script in your grails app, set a breakpoint, and debug that? Does it stop at the breakpoint?
Can you create a java file in your grails app, ensure that it is called from your grails app somehow, and set a breakpoint in it. Does the debugger stop there?
Also, would be very helpful to get a copy of your grails app (but I'm guessing this is unlikely).
Oct 12th, 2010, 07:09 AM
First of all, thanks for your response.
My app has tons of java code. Debugger stops at break points set in Java code but not in groovy. FYI, this is an existing project(grails ver.1.1) imported into STS. Wondering if it is version of grails because I created a sample project in STS yesterday and it does stop at groovy break points. While existing does not. Anything to do with version?
Oct 12th, 2010, 10:31 AM
It's possible that the problem has something to do with using Grails 1.1. We have not tested on anything less than 1.2. The main problem might be that Grails 1.x is based on the Groovy 1.6 compiler, but Groovy-Eclipse ships with the 1.7 compiler.
I would recommend doing the steps to switch to using the 1.6 compiler and seeing if that works for you. See the instructions here (note that this changes the compiler setting for the entire workspace):
But, really, the best thing to do would be to upgrade to a more recent version of grails.
Tags for this Thread