what about functions passed as arguments? quite a basic technique and I don't think it passes this test.
It's more involved than just grepping for the name, but the same is true of tracing where any other argument value came from.
Basically the important aspect is that even if you have higher order functions, the things passing the functions to these higher order functions will still be greppable.
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> function f(g) g[1]() end
> function thisFunctionCrashes() undefinedVariable() end
> f({thisFunctionCrashes})
stdin:1: attempt to call global 'undefinedVariable' (a nil value)
stack traceback:
stdin:1: in function '?'
stdin:1: in function 'f'
stdin:1: in main chunk
[C]: ?
In the example, the source line is available, but in the genuine article the thunks are for native functions.