A simple example:
coroutine.resume(coroutine.create(function()
print(debug.traceback())
end))
print(debug.traceback())
the output:
stack traceback:
./v.lua:2: in function <./v.lua:1>
stack traceback:
./v.lua:4: in main chunk
[C]: in ?
It shows that traceback inside a coroutine doesn't know about how it is resumed, so that xxx: in main chunk doesn't show.
How can I get the complete stacktrace inside a coroutine?