Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

Re: [groovy-user] debugging state dumping question

Erick Erickson

2008-08-22

Replies: Find Java Web Hosting

Author LoginPost Reply
This works for variables in the binding, i.e. things not
declared with "def" or a strong type.

bonkers = "some stuff"

binding.variables.each {key, val ->
    println "$key -> $val"
}


I'm not clear how to get variables that are declared with "def" etc.
though, is that what you need?

HTH
Erick

On Fri, Aug 22, 2008 at 3:08 PM, Raoul Duke <raould@gmail.com> wrote:
hi,

(haven't found an answer / lead via searching yet.)

i would very much like to be able to dump the current state of a
groovy script. by that i mean: the script has variables declared and
manipulated in the script. i'd like to be able to dump out the values
of all those variables. how might i do that at an arbitrary point at
runtime?

many thanks for any clues. :)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



©2008 gg3721.com - Jax Systems, LLC, U.S.A.