Skip to main content.

Groovy/Grails debugging

About a month ago I tweeted out “How do you debug in Groovy and Grails?”  Someone had asked me privately, and I have to say I can’t recall who it was.   Can’t find the tweet or email, whatever it was.  Whoever asked – I apologize for not having got back to you. 

Here were the answers I got back on from Twitter.  :)

  • Keith_normal
    keithcochran: @groovymag I use IntelliJ and start the server in debug mode. It works well but some classes (like services) I have to use log.debug()
  • Img_0119_normal
    dani_latorre: @groovymag : grails-debug run-app + eclipse breakpoints
  • Colin-med_normal
    colinharrington: @groovymag intellij is the only one that I have been able to debug in. Eclipse worked up until you had plugins or joint compilation
  • Me_normal
    AndreasArledal: @groovymag So far just using println has worked well. I’m considering moving from textmate to Idea, if I do I’ll probably use grails-debug.
  • Me-pic_normal
    graemerocher: @groovymag println for simple stuff. Intellij + grails-debug run-app for anything more complex
  • P2160080_normal
    burtbeckwith: @groovymag I usually run with “grails-debug run-app” and attach the Eclipse debugger as needed
Share and Enjoy:
  • description
  • Digg
  • Reddit
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Simpy
  • StumbleUpon

2 Responses to “Groovy/Grails debugging”

  1. dreur says:

    Who need to debug when testing ?

  2. admin says:

    You’re assuming that they’re 2 different things. In some cases they are, but not all. Writing tests just tests that the output is correct – you may still need to work step by step through the code that you’re testing. Debugging IDEs help that.

Leave a Reply