[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Getting local variable debug info from within a nested function.
- From: Rici Lake <lua@...>
- Date: Sat, 16 Jun 2007 23:00:44 -0500
On 16-Jun-07, at 3:39 PM, Matthew Armstrong wrote:
This thing is pretty f*%#ing cool! Thanks for writing this. It has
more features, and is easier to use than what I was trying to do, so
I'll definitely be using this.
One small point: Is there a way to print a table? You can print the
keys, if you know them, but I didn't see a way of reflecting a table.
I have a special print function (called ppr), which prints the first
level keys if the variable happens to be a table. So I can say:
exec ppr(myVar)
This works ok for me, but I'm always looking for ways to lazyfy my
typing.
The easiest way to do it is to replace the definition of output in
ldb_config.lua. That method defaults to print(), but you can override
it to do anything you like (although I suggest maintaining something
like the semantics of print(), at least in the sense that it can
receive multiple values.)
It would be very easy to define a ppr command; I'm planning on
using that as an example of advanced ldb configuration, before
I actually do a beta release.
- References:
- Getting local variable debug info from within a nested function., Matthew Armstrong
- Re: Getting local variable debug info from within a nested function., Stefan Sandberg
- Re: Getting local variable debug info from within a nested function., Sherry Zhang
- Re: Getting local variable debug info from within a nested function., Eduardo Ochs
- Re: Getting local variable debug info from within a nested function., Matthew Armstrong
- Re: Getting local variable debug info from within a nested function., Steve Heller
- Re: Getting local variable debug info from within a nested function., Stefan Brantschen
- Re: Getting local variable debug info from within a nested function., Matthew Armstrong
- Re: Getting local variable debug info from within a nested function., Stefan Brantschen
- Re: Getting local variable debug info from within a nested function., Matthew Armstrong
- Re: Getting local variable debug info from within a nested function., Matthew Armstrong