Setting a watch variable to params or request in the following action closure yields...
Cannot find local variable 'params'
def myAction = { }
Of course, if we set the params argument to a reference, then we can interrogate it. So we know the object is there... so what gives?
def myAction = { def myParams = params def myRequest = request }
The answer is simple and opaque at the same time. Closures aren't methods. I'm guilty of forgetting this and Grails is great about hiding this fact from us. However, IntelliJ isn't that smart. When debugging in IntelliJ, we have ask the Closure the right question.
this.getProperty("params")
Ah Ha! There is my params argument in IntelliJ. Now I can stop writing println everywhere...
More info on Closures
Formal Definition
Informal Guide