Task

The goal is to get the source code or file path and line number where a programming object (e.g. module, class, function, method) is defined.




debug = require("debug")
function foo(bar)
  info = debug.getinfo(1)
  for k,v in pairs(info) do print(k,v) end
end
foo()