Results 1 to 7 of 7

Thread: Debugging Grails

  1. #1
    Join Date
    Jun 2005
    Location
    São Paulo, Brasil
    Posts
    86

    Question Debugging Grails

    I'm really happy that Grails support in Eclipse is finally reaching a "professional" level. Better Eclipse support is absolutely necessary for Grails to grow beyond a niche.

    The Groovy/Grails support in STS 2.3 is great, keep up the good work!

    IMHO, a working debugger is a great part of the IDE integration "experience", and
    the documentation about debugging is pretty short.
    I haven't figured out how to inspect arbitrary variables in my code yet(specifically, I'm interested in the "params" variable that is available for controller closures). How can I use Eclipse debugger's "Inspect" feature or similar?

    Thanks in advance,
    Daniel Serodio
    Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Hi Daniel,

    There is debugging support, but it is basic as of now. When launching a grails application in debug mode from Eclipse, breakpoints should be hit appropriately.

    It is possible to examine variables using the variables view. However, Groovy does a few things to make this examination more complicated. Inside of closures, Groovy wraps all locally defined variables inside of Reference objects. So, the params variable should appear in your variables view, but its type will be of Reference, not Map. You will need to expand the Reference object to see its value.

    We are planning to fully explore debugging support post 2.0. This will include things like more readable stacks and an easier to read variables view.

  3. #3
    Join Date
    Jun 2005
    Location
    São Paulo, Brasil
    Posts
    86

    Default

    We are planning to fully explore debugging support post 2.0. This will include things like more readable stacks and an easier to read variables view.
    That's great news, do you have an approximate ETA for v2.0 ?
    Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

  4. #4
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    747

    Default

    Quote Originally Posted by dserodio View Post
    That's great news, do you have an approximate ETA for v2.0 ?
    Early January.

  5. #5

    Default Debugging in test-app

    Will the enhanced debugging support debugging while running tests (executing test-app)? I am not able to find a way to do that now.

  6. #6
    Join Date
    Mar 2010
    Posts
    1

    Question Instructions?

    Could someone who mastered debugging Grails in STS 2.3 maybe list the main points you have to take care of?
    Or point me to a place where I can find them?

  7. #7
    Join Date
    Sep 2009
    Posts
    1

    Default No variables are shown

    While debugging my grails-application, in Eclipse (STS 2.3), i only see a variable called "this" (for a RoomController) and a variable called "it" with the value null. I want to see params, retrunvalues an so on. Is someone able to post a link to a helpful Post? What could be wrong, when i see only the Closure for the controller, that i want to debug ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •