Debug
The Debug library offers powerful tools for inspecting and modifying Luau functions at a bytecode level.
It allows you to access constants, upvalues, stack frames, and internal structures of functions that would otherwise be hidden - making it especially useful for reverse engineering and hooking.
What can you do?
With the Debug library, you can:
- Inspect constants with
debug.getconstants,debug.getconstant - Modify constants using
debug.setconstant - Access upvalues using
debug.getupvaluesanddebug.getupvalue - Replace upvalues with
debug.setupvalue - Read or write values from a stack frame, using
debug.getstackanddebug.setstack - List or retrieve function prototypes, using
debug.getprotosanddebug.getproto
What can't you do?
- You cannot access C closures with this library, such as
print