URL:
  <http://gna.org/patch/?6563>

                 Summary: More useful Lua output for interactive debugging
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sun 08 Nov 2015 14:24:29 UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 

    _______________________________________________________

Details:

When I'm interactively poking server Lua from the chat line as a sort of REPL,
the minimum invocation to print most values is


/lua cmd log.normal(tostring(...))


e.g.


jtn: 'lua cmd log.normal(tostring(find.nation_type(0)))'
/lua: <Nation_Type #0 Abkhaz>


It would be nice to have something more convenient.

print() is currently no good because it outputs to stdout. This happens to
work if you're on the server console, but not if you're a client with 'hack'
access using the chatline.

It might be nice to just print the values of expressions, although this
doesn't seem to be a standard part of the lua(1) REPL.

(In fact, now I check, the client Lua console has the same problems. print()
goes to the client's stdout.)




    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?6563>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to