Debug Library Tutorial

lua-users home
wiki

You can find details about the debug library in section 5.9 of the Reference Manual [1].

This page is largely under construction. Please add content.

debug.debug()

debug.getfenv(o)

debug.gethook([thread])

debug.getinfo([thread,] function [, what])

debug.getlocal([thread,] level, local)

debug.getmetatable(object)

debug.getregistry()

debug.getupvalue(func, up)

debug.setfenv(object, table)

debug.sethook([thread,] hook, mask [, count])

debug.setlocal([thread,] level, local, value)

debug.setmetatable(object, table)

debug.setupvalue(func, up, value)

debug.traceback([thread,] [message] [, level])

Comments

I don't think pages should be created without content. There are a dozen skeleton pages on the wiki waiting for content that will never come. Also, isn't the reference-like layout here at odds with the goal of a tutorial? --JohnBelmonte

Agree in general concerning skeleton pages. For completeness with the other library tutorials, this page will need to get filled in as well.

I had concerns about the structure of the library tutorials too. For example, we have StringsTutorial and TablesTutorial giving the basic qualities of these data types. Then we have StringLibraryTutorial and TableLibraryTutorial listing all module functions in roughly alphabetical order, with examples for each and some duplication of descriptions from the Lua Reference Manual. The only way this follows the tutorial is that each function description is partly example orientated. However, at a high-level, it's not structured as a tutorial, and doing that would take some work. See also LuaReferenceManualComments.

--DavidManura

Well it is a wiki! :) I created it on here so other people could edit it. And they seem to be doing a good job of maintaining it on the whole. The StringsTutorial, like the other types is just supposed to demonstrate that particular type and the library tutorial shows examples of usage, which the Lua docs lack. I personally find this easiest way to grok a new language quickly. Tastes may vary. There are other sources of information, like code snippets etc. I also find the reference type layout useful for quick referral when I forget a feature. Again, tastes may vary; some might prefer more verbosity and discussion of usage. -- Other pages have indeed been left blank in the hope that people would fill these out. I haven't got round to it either. In the beginning the wiki had little structure and my experience of wikis is if someone doesn't take gentle, steering ownership of something it can just turn into a big mess. --NickTrout

RecentChanges · preferences
edit · history
Last edited January 6, 2008 2:38 am GMT (diff)