π¦ββ¬Debugging
A few days ago I came across something that was useful to me and I will share it with you. The official post of this thing is by jaysixty from the official QBCORE group because this worked very well
-- Add this to top of the file
local Debug = function()
print("LINE:", debug.getinfo(2).currentline)
end
-- Add this where ever you need the print
Debug() -- in this case, print would be 7local Debug = function(...)
if Config.DebugHelper then
local info = debug.getinfo(2, "Sl")
local side = IsDuplicityVersion() and "Server side" or "Client side"
local debugMsg = string.format("[%s] FILE: %s LINE: %d", side, info.short_src, info.currentline)
print(debugMsg, ...)
end
end
-- Add this where ever you need the print
Debug() -- in this case, print would be 7Last updated