> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-prison/developer-guide/developer-mode.md).

# Developer Mode

The four development switches, every tool each one unlocks, and the checklist before your server goes public.

Mango Corrections ships with four independent development switches. They do different jobs and are worth understanding separately — one is harmless, three are not.

| Switch                         | What it is                                                                           |
| ------------------------------ | ------------------------------------------------------------------------------------ |
| `Config.Debug`                 | **Bounds only.** Draws prison zones and target boxes in the world. Nothing else      |
| `Config.Developer`             | **Developer mode.** Verbose logging, every dev tool, and open CCTV placement         |
| `Config.DevTerminal.enabled`   | Opens the corrections terminal to **any** player and skips every authorisation check |
| `Config.DoorInspector.enabled` | The aim-at-a-door name reader                                                        |

{% hint style="danger" %}
**All four must be off before your server goes public.** The resource prints reminders at boot while they are on. See the [checklist](#before-you-go-live) at the bottom of this page.
{% endhint %}

## `Config.Debug` — bounds

```lua
Config.Debug = true
```

Draws every zone polygon and every target box in the world, and nothing more. It is safe to flip on for a walk around while you are lining zones up, and it has no effect on permissions, validation or gameplay.

## `Config.Developer` — developer mode

```lua
Config.Developer = true
```

Verbose console output plus the whole toolbox.

### Tools it unlocks

| Command           | Does                                                                                                                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/setzone`        | Build a zone **by walking its perimeter**. `[E]` drops a corner, `[X]` undoes one, `ENTER` copies a paste-ready polygon. The outline draws live and closes itself; run it again to cancel                                |
| `/visitdemo [id]` | Runs the **prisoner half of a visit** exactly as a real visitor would trigger it — PA announcement, the Y/N accept prompt, the walk in, letterbox, countdown and the return trip — with no visitor. Defaults to yourself |
| `/visitseat`      | Lists every seat in the visitation wing to the F8 console                                                                                                                                                                |
| `/visitseat <n>`  | Sits **you** in that seat so you can check its position, heading and animation. `/visitseat up` stands you back up                                                                                                       |
| `/editvisitfocus` | Opens the visitation **focus camera and its arrow-key tuner** wherever you are. `ENTER` copies the tuned config block                                                                                                    |
| `/hudtest`        | Forces the HUD up with dummy data, bypassing the server entirely. If it shows nothing the NUI page is stale; if it shows, the problem is the data path                                                                   |

### CCTV placement

Developer mode opens `/prisoncam` to **everyone** — no ace needed — so a dev server can dot cameras around freely. With it off, the ace decides:

```cfg
add_ace group.admin command.prisoncam allow
```

See [CCTV Cameras](/mango5m-docs/resources/mango-prison/configuration/cctv-cameras.md).

### Escapes in developer mode

Testing a three-stage escape route against production rules is close to impossible: a two-hour per-player cooldown after every attempt, a one-hour server-wide one after every success, and a failed stage that ends the run and marks the prisoner's conduct.

Developer mode removes all of it:

* **No cooldowns.** Attempt as often as you like, server-wide or per player
* **No alert rolls.** The prison never locks down on you halfway through
* **Nothing is cancelled and no conduct is marked.** A failure is ignored and the attempt stays live, so you can walk the whole route including the stumbles
* **The timing and position floors are skipped** — they are the usual reason a test run dies halfway
* **One easy skill check** at every stage, instead of the configured medium/hard mix

Nothing about this changes the route, the required items or the stage order — the steps are the same steps, just survivable. See [Escapes](/mango5m-docs/resources/mango-prison/configuration/escapes.md).

## `Config.DevTerminal` — the development terminal

```lua
Config.DevTerminal = {
    enabled     = false,   -- keep FALSE on a live server
    command     = 'terminal',
    warnSeconds = 60,
}
```

When enabled, **any** player — prisoners included — can open the corrections terminal with `/terminal`, and the server **skips every authorisation check**: no job, no grade, no proximity to a real terminal.

It exists so you can work on the terminal UI while jailed, without swapping jobs.

{% hint style="danger" %}
While this is on, *any* player can start lockdowns, issue write-ups, send inmates to solitary and broadcast on the PA.

So it cannot be left on by accident it prints a warning to **every player's F8 console once a minute**, a banner to the **server console at boot**, and shows a blinking red **`[DEV MODE]`** tag in the terminal header.
{% endhint %}

With it disabled nothing is registered — no command, no warning thread, no bypass — so the resource's idle cost is unaffected.

## `Config.DoorInspector` — naming doors

```lua
Config.DoorInspector = {
    enabled  = true,       -- keep FALSE on live servers
    distance = 12.0,       -- how far the pointer reaches, in metres
}
```

`/doorinspect` draws a pointer line in front of you. Aim it at a door and its **ox\_doorlock name** appears on the door, along with whether that name is already wired into `config/doors.lua`. `ENTER` copies the door's model and coordinates.

This is how you fill in `config/doors.lua` without digging through SQL — see [Doors & Lockdowns](/mango5m-docs/resources/mango-prison/configuration/doors-and-lockdowns.md).

## Position and prop tools

Coordinates themselves come from a separate free resource, [**Mango Positions**](/mango5m-docs/free-resources/mango-positions.md): pose a transparent stand-in where the thing goes and copy the exact `vec4`, or use its `/mprop` placer to lay out props — which is how the kitchen's serving counter was dressed.

## Before you go live

{% hint style="warning" %}

```lua
Config.Debug                 = false
Config.Developer             = false
Config.DevTerminal.enabled   = false
Config.DoorInspector.enabled = false
```

Then confirm the server console is quiet at boot: with any of them on, the resource prints a reminder naming it.
{% endhint %}

Day-to-day corrections work — write-ups, solitary, cell moves, visit bans, announcements — is meant to happen on the [prison terminal](/mango5m-docs/resources/mango-prison/features/the-prison-terminal.md), where it is grade-gated and audit-logged. The [`/prison` command](/mango5m-docs/resources/mango-prison/reference/admin-commands.md) is the admin escape hatch, and it stays ace-restricted whether developer mode is on or not.
