Dumping what a function calls

I’m interested in how you would be able to dump what a function does.
Ex.
function x()
–code here
end

Lets say I don’t know what x calls, but I know what the function is, to dump what it calls.

There isn’t really an easy way of doing it. You could literally read the file it’s in and just grab the part of the string that you need with a regular expression. This will only work on the server, however, since the client can’t read Lua files once they’ve been packed and cached.
You could temporarily change the function to return the debug info, and then you’d know the file it’s in (I think).

file.Read("…/cache/dua/*.dua")

mhmm.

Yeah, if you want the game to search all the cached files. I’ve never tried doing that. file.FindInLua is supposed to do that automatically, but it turns up blank on the client. I suppose I should have specified that it’s for files found by FindInLua. I’m not sure how you’d find the right file out of the dua cache without reading all of them.