我试图弄清楚当我全局覆盖它时如何找到调用特定函数的脚本.例如:
rawset(_G, 'print',
function()
--check if xxx program is calling, then print a different way
end)
Run Code Online (Sandbox Code Playgroud)
要么
_G.print =
fucntion()
--check if xxx program is calling, then print a different way
end
Run Code Online (Sandbox Code Playgroud)
我如何确定哪个脚本调用print()?我知道我应该使用lua的调试功能,但我不确定究竟是什么.