Parameters
Returns
void
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
debug.setname(func: function, name: string): ()
| Parameter | Type | Description |
|---|---|---|
func | function | The target function to rename. |
name | string | The new debug name for the function. |
void
local function test() end
debug.setname(test, "new_func_name")
print(debug.getinfo(test).name) -- "new_func_name"
debug.setname(function() end, "anonymous_hook")