On Tue, Feb 4, 2020 at 8:02 PM nobody wrote:
And it also won't work if you want to use debug hooks on a separate
coroutine (e.g. abort after N instructions or on any attempted
call, for safely un-dumping some values).
I can't reproduce your problem.
The following code works fine for me.
Tested on both vanilla Lua and LuaJIT 2.1-- create a separate coroutine
local co = coroutine.create(
local function Func() end
-- set hook on the separate coroutine
local info = debug.getinfo(co, 2, "n")
local func_name = info and info.name or "?"
'cr' -- on function call and return
-- run the separate coroutine