Yuari
Documentation
Docs/Debug/debug.getregistry

debug.getregistry

Returns the Lua registry. The global getregistry from the cache library also returns it.

Syntax

debug.getregistry() -> any

Parameters

This function takes no parameters.

Returns

TypeDescription
anyThe Lua registry

Description

debug.getregistry is part of the Debug library. The debug library exposes the internals of the active Luau state, including protos, constants, upvalues and stack frames.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

print(debug.getregistry())

Notes

  • Writing protos, constants or upvalues can corrupt a running function; test changes carefully.