Volt

setstackhidden

Sets whether a function is hidden from stack traces.

Syntax

setstackhidden(func: function, hidden: boolean) -> void

Parameters

ParameterTypeDescription
funcfunctionThe function to modify
hiddenbooleanWhether to hide from stack

Returns

This function does not return a value.

Description

setstackhidden controls whether a function appears in stack traces and debug info. Hidden functions are invisible to stack inspection.

Example

local function secretFunc()
    print("This function is hidden!")
end

setstackhidden(secretFunc, true)

-- Now secretFunc won't appear in debug.traceback()

Use Cases

  • Hiding hook implementations
  • Preventing detection via stack inspection
  • Clean stack traces

On this page