JDB debugging of Groovy/Grails code

I'm attempting to debug some issues in some (rather bletcherous) Grails code that I inherited. I'm a relative noob in Groovy and Grails although an old Java guy.

Here's the problem: I have this thing running with jconsole and jdb hooks in, but it's tough to use the debugger because so much of the code is in closures. So, for example,

def niftyMethod = {
    // do something nifty
    anObject.doSomethingThatBreaks()
}

as the implementation of a single method on a controller.

Being a closure, the name (by the time the debugger sees it) is TheController.closure527 (or something like that), and notably hard to find.

So, how can one find the map from the block name to the closure?

More generally, are there any good tutorials on doing this sort of thing?

Ideally the answer won't involve changing over to IntelliJ, as if God had meant us to use IDEs like that She wouldn't have given us EMACS.

5
задан Charlie Martin 11 September 2010 в 14:44
поделиться