Maybe you’re experiencing trouble with your IDE debugger, or you’re just a hard core VI kind of guy. Either way sometimes you need something a little more than println. Lucky for you Groovy has a pretty powerful yet undocumented debugging tool built right in called the Object Browser. It’s far from a full blown debugger, but it’s a great object inspector.
To use this inspector just add this anywhere in your Groovy program where someObject is the object that you’d like to inspect:
groovy.inspect.swingui.ObjectBrowser.inspect(someObject)
You’ve probably already noticed the swingui part of it. This brings up a handy dandy window for interactive inspection. It looks something like this:

But wait, there’s more. If you’re working with closures, as is the case almost everywhere in
Groovy on Grails, try inspecting the object owner. This will inspect the container for the closure you’re currently running, which provides a ton vital information.
