lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Well, sort of. Google for
lua sethook
and you'll see several hits. The hook functionality can be used from either lua code or C code (depending on your needs). You won't be able to decide if you want to execute the line of code or not, but you are notified when a new line of code is about to be executed.

-- Tim Gogolin

On Sep 23, 2004, at 7:46 AM, Florian Berger wrote:


Hi.

I would like to have control over code execution (something similar like debug hook). Is it possible to assign a function which is called after every string/line executed in Lua? The function would receive the code to be executed and could decide if it is executed or not. If function executes the code then everything would work as normal.

I searched from lua-l archive and web but could not find answer.

f