Announcement Announcement Module
Collapse
No announcement yet.
Debugging Grails Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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.

    Comment


    • #3
      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 ?

      Comment


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

        Comment


        • #5
          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.

          Comment


          • #6
            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?

            Comment


            • #7
              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 ?

              Comment

              Working...
              X