[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: "Matthew Armstrong" <turkeypotpie@...>
- Date: Mon, 11 Jun 2007 13:28:15 -0700
With regards to my original question, is there a way to get the upvalue's value? If ldb can do it, I'm assuming there is a way.
With regards to the rest of this thread, I think it's very cool that lua is flexible enough to make it do what you want. We have a quasi in-language dsl for expressing game states, and I can't think of any other language that would let us to that so easily.
BUT, this flexibility comes at a price. When it comes to standard tools, such as debuggers and development environments, I find lua to be severely lacking. There are a lot of projects in the works: luaedit, lua-ide, qde, vslua, VS lua lang pack, luaeclipse, blua, luaplus remdebug, and others. _NONE_ of these work for me, meaning they don't have the features I want (namely a good debugger), or they are simply too buggy to use. I haven't played around with ldb yet.
Really though, when it comes down to it, I'm lazy. Or, more accurately, like many other people, I have a job to do with deadlines etc. While I would like to spend some time delving lua's internals and possibly contributing back to the community, I simply don't have the time. Something that simply works "off the shelf" is great in my book.
Sure, you could argue that no development environment fits everyone's shoe, but quite interestingly, squirrel's _single_ development environment (sqdev) has pretty much exactly the features I would desire:
http://wiki.squirrel-lang.org/default.aspx/SquirrelWiki/SQDEV.html
I don't find this to be at all bloated, and find it vastly more useful than all of lua's IDEs combined. Maybe I've been weaned on using debuggers over the years, but having breakpoints with variables really does make my life easier. I actually talked a bit with the LuaEclipse guys, and they are certainly thinking about something like this, but like so many other things, it's "in the works."
On 6/9/07, Eduardo Ochs <eduardoochs@gmail.com> wrote:
On 6/9/07, Sherry Zhang <yuleopen@gmail.com> wrote:
> Well, I dont know. I am not a language developer.
> Many Scheme implementation's IDE can help us to debug our program,
> but the standard R5RS did not define such library.
> Maybe in lua, a debugger can break the program at some place and find
> get all the variables in the stack?
The IDEs use some low-level routines to access the information inside
each closure - and the debug library provides these routines.
Several people here have written small debugging tools for Lua that
are at most a few hundreds of lines long and that provide most of what
we need from the IDEs, but without the bloat. At some point - very
soon, it seems - these tools will be clean enough and well-documented
enough. Right now they are a bit hard to understand, but they're not
big black boxes like the usual IDEs.
> I am not a language developer.
There are many languages around in which the gap between "user" and
"language developer" is huge - but Lua is not one of them.
By the way, have you seen this?
http://www.lua.org/pil/23.html
Cheers,
Eduardo Ochs
eduardoochs@gmail.com
http://angg.twu.net/