add debug.get_traceback

This commit is contained in:
MihailRis 2024-11-18 11:09:27 +03:00
parent dcd8871ee1
commit 712c0756b8

View File

@ -228,6 +228,20 @@ function file.readlines(path)
return lines return lines
end end
function debug.get_trackback()
local frames = {}
local n = 0
while true do
local info = debug.getinfo(n)
if info then
table.insert(frames, info)
else
return frames
end
n = n + 1
end
end
package = { package = {
loaded={} loaded={}
} }