July 2018
Beginner
202 pages
5h 42m
English
Lua provides hooks to monitor an application running in real time. An event handler function can be registered to be executed every time an event or hook happens. There are four types of events that can be hooked into:
To register for line, call or return, call debug.sethook with a handler function and the first letter of the event being hooked into. For example, registering for call events would look like this: debug.sethoof(function, "c"). The event handler function should take one argument in all cases, except ...