[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua debug hooks
- From: Michal Kolodziejczyk <miko@...>
- Date: Tue, 28 Feb 2012 12:10:10 +0100
On 28.02.2012 02:22, Josh Klint wrote:
> I am not sure what this means, but the hook doesn't seem to get called
> in the manner I expect. If I had a script like below, I would expect
> the hook to be called after executing each line:
> local a = 1 --hook executed!
> local b = a + 1 --hook executed!
> b = b + 2 --hook executed!
> Is the functionality I want supported in Lua? Thanks.
Works for me:
$ cat test.lua
function cb(event, nr)
local a = 1 --hook executed!
local b = a + 1 --hook executed!
b = b + 2 --hook executed!
$ lua test.lua
Check for yourself at http://www.lua.org/cgi-bin/demo (you may wish to
call debug.sethook() as the last line)