Hi there,
I wrote a method that prints the trace led to a specific line. However all it does is list the functions, but I would really like to see which line numbers those functions were called, considering I often have many calls of the same function and it would take a while to brute-force check each instance of the method. Is there a way to print out the line numbers instead of just the function names?
My current code:
Code:
function debug_printStack()
for x=2, math.huge do
if debug.getinfo(x) == nil then
break
end
print(debug.getinfo(x).name)
end
end
EDIT: Replacing "name" with "currentline" works. Don't know how I missed that but I'll leave it up in case anyone else finds this useful.