Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

Re: [groovy-user] debugging state dumping question

Raoul Duke

2008-08-22

Replies: Find Java Web Hosting

Author LoginPost Reply
> So a debugger might be the thing you should be using :-)

ja, in some cases, yes, but that isn't always the right answer; i'd
like to be able to have some non-interactive logging ability. what i'm
trying now (just typed it in, haven't run it yet) is something like:

     Binding binding = script.getBinding();
     Map name2Value = binding.getVariables();
     for( Object name : name2Value.keySet() )
     {
       str += "(" + String.valueOf( name ) + ",";
       str += String.valueOf( name2Value.get(name) ) + ")";
     }

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

  http://xircles.codehaus.org/manage_email


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