> For the complete documentation index, see [llms.txt](https://docs.sonoransoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonoransoftware.com/store/sonoran-station-displays/diagnostics.md).

# Diagnostics

## In-game diagnostics

Open:

```
/stationdisplay > Mounted Displays > View Diagnostics
```

The player needs `sonoran.stationdisplay.menu` to open the menu and `sonoran.stationdisplay.diagnostics` to open diagnostics. The menu shows:

* CAD detected, compatible, version, and current error
* Configured and nearby display counts
* Active DUI count
* LEO and Fire/EMS unit counts
* Emergency and dispatch call counts
* Cache revision
* Bodycam runtime/capture dependency detected, available, and mode
* Source client, capture active, last attempt/success, and upload duration
* Latest frame size/sequence, subscribed viewers, and visible feed count
* Accepted, malformed, oversized, stale, failed, and rate-limited counters

Use **Refresh Diagnostics** for a new snapshot. The menu does not currently show webhook status, per-cache timestamps, map clipping, or each DUI's last update.

## Server diagnostic

Run in the server console:

```
stationdisplay_serverdiag
```

It prints a JSON snapshot containing the CAD object, display and cache counts, cache revision, promotional-data status, and bodycam state. A player can run the command only with diagnostics permission. Running it creates a local administrative audit entry and, when configured, a webhook diagnostic entry.

## Permission diagnostic

When `Config.Debug = true`:

```
stationdisplay_permissiondiag [serverId]
```

The console can inspect any source. A player needs diagnostics permission. Output covers logical action, backend action, ACE node, current menu snapshot, server action, and persistence diagnostics.

## Persistence repair

Console only:

```
stationdisplay_repair_persistence
```

Use this only after the active persistence file is unreadable. The command backs it up as `data/displays.invalid.<epoch>.json`, resets from the shipped default, and requires a resource restart. See [Persistence](/store/sonoran-station-displays/persistence.md).

## Map diagnostics

`Config.Map.debug = true` adds a visual projection overlay to Live Map. It reports map bounds, asset crop, clipping, and selected viewport data. This is separate from the in-game diagnostics menu.

## Refresh options

* **Force-Refresh Display** requires edit permission and refreshes one selected display.
* **Full Display Resync** requires diagnostics permission and resends the server snapshot.
* Restart/rejoin performs the normal initial synchronization.

None of these forces SonoranCADFiveM to rebuild its own caches.

Continue with [Troubleshooting](/store/sonoran-station-displays/troubleshooting.md) for symptom-based checks and error codes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sonoransoftware.com/store/sonoran-station-displays/diagnostics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
