> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# sethiddenstack

> Marks or unmarks a function, or the function at a stack level, as hidden. target must be a function or stack level number. hidden defaults to true. Invalid stack levels raise "Level out of range". setstackhidden is an alias.

Marks or unmarks a function, or the function at a stack level, as hidden. target must be a function or stack level number. hidden defaults to true. Invalid stack levels raise "Level out of range". setstackhidden is an alias.

## Syntax

```lua theme={null}
sethiddenstack(target: function | number, hidden?: boolean)
```

## Aliases

* `setstackhidden`

## Arguments

| Name     | Type                 | Required | Description                                                                                      |
| -------- | -------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `target` | `function \| number` | Yes      | Function or stack level number to mark or unmark.                                                |
| `hidden` | `boolean`            | No       | Whether the resolved function should be marked hidden. Defaults to true; false removes the mark. |

## Example

Add or remove a function closure from hidden stack tracking.

```lua theme={null}
local function target()
end

sethiddenstack(target)
print(ishiddenstack(target))

sethiddenstack(target, false)
print(ishiddenstack(target))
```
