Thanks for the replies
Nope it wasn't the globals that I wanted to see, it was the contents of the Lua Registry.
Rena's reply was exactly what I needed, nice and simple too, just a one liner. My Googling somehow managed to miss debug.getregistry ().
> Date: Tue, 26 Nov 2013 00:28:41 +0000
> From: email@example.com
> To: firstname.lastname@example.org
> Subject: Re: Question about Lua Registry
> Hey Geoff,
> If I understand the question correctly, you want to see the keys/values
> of all global variables in lua?
> If so:
> for key, val in pairs(_G) do
> Obviously "val" will be rendered unsatisfyingly in cases of tables and
> functions, but it'll give you an idea of what's there, at least. You
> could do a check for tables and have a sub-loop to iterate through
> those, if you liked..
> On Tue, 26 Nov 2013 00:15:01 +0000
> Geoff Smith <email@example.com> wrote:
> > Hi
> > Bit of a newbie type question I am afraid
> > For the purposes of a debugging aid, is it possible to iterate
> > through and print out the contents of the Lua registry from a) pure
> > Lua code, and b) from C using the C API ? I am guessing b) is
> > possible but I cant find any example code or mention of this so I am
> > wondering if that statement is actually true ? Thanks for any guidance
> > Regards Geoff