olivier -
welcome to grails. i originally started developing using STS and
eventually got fed up that i wasn't getting the benefits of the IDE
(method completion, correct syntax highlighting, etc) but still
getting all the drawbacks (slow, memory hungry, etc). they may have
made great strides in their ability to handle groovy's dynamic nature,
and i hear intellij is very good, but i've been using sublime text 2
(ST2) with the console for about a year and have no plans to go back.
my suggestion would be to try the 4 window grid mode in ST2. i find
that being able to see my views/templates/services/controllers/domains/
taglibs/src files/etc (pick any 4) simultaneously has made a huge
benefit in productivity. instead of having to flip back and forth -
what did i name that variable? - i can see it all at once.
but, you asked about debugging. i do still rely on STS for debugging
and SVN merging between branches. however, i've found that as i get
more comfortable/experienced with grails i almost never use STS for
debugging. (on a side note, if STS tells you that your project isn't
compiling you can often ignore it and it will run and step debug just
fine.) :)
i'd recommend installing the "console" plugin. that will give you the
benefit of a grails console in a separate tab in your web browser, so
you can easily run your app and test small bits of code at the same
time. i've found that works as a bit of on-the-fly TDD to figure out
any interesting or algorithmic bits of code before trying them in the
broader application context. as well, playing with groovy datatypes
and collection methods is way faster there, and easier to see what
works and what doesn't. for instance, yesterday i came up with this
in a taglib:
if ( value instanceof String[] )
out << value.flatten().sort().join("...")
else if ( value instanceof Map )
out << value.entrySet().sort { it.key }.flatten().join("...")
close, but subtly different. and much easier to get it right when i
don't have to click through multiple screens in the app to get to
where i want only to see a stacktrace in the console.
one other thing that will probably happen using the console, which i'm
not a fan of but find myself occasionally doing anyway, is littering
println's throughout your code. blech. but it does the job. :)
finally, straight up TDD will also work, and then your tests will
stick around for future benefit.
hope that helps!