tired of seeing [script:resource] for every print and having to grep through 80 resources to find which one printed something.
local resourceName = GetCurrentResourceName()
local function dprint(...)
local info = debug.getinfo(2, "Sl")
local file = info.source:match("@?(.+)$") or "?"
local line = info.currentline or "?"
print(('[%s:%s:%d]'):format(resourceName, file, line), ...)
end
-- usage
dprint('hello', 'world', { foo = 1 })
-- output: [my_resource:server.lua:42] hello world table: 0x...
drop into a shared util and import everywhere. small thing but saves hours over a year.