小编Nim*_*ima的帖子

Lua Global Override

我试图弄清楚当我全局覆盖它时如何找到调用特定函数的脚本.例如:

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的调试功能,但我不确定究竟是什么.

debugging lua overriding global function

2
推荐指数
1
解决办法
2782
查看次数

标签 统计

debugging ×1

function ×1

global ×1

lua ×1

overriding ×1