# XWUIGameSaveDebug

A collapsible save-state inspector for debugging persistence. It lists save slots in a Slot/Size/Time table (from the `saves` array), and selecting a slot opens an inspector with a Tree/Raw view toggle: Tree renders the `rawData` as a collapsible key/value tree (or the slot's `keys` when no raw data is present), while Raw shows pretty-printed JSON. Use it to verify what's actually written to each save: feed it `saves` (each `{ slot, size, timestamp, keys }`), `selectedSave`, and `rawData` via `updateData()`, pick a slot with `selectSlot()`, switch panes with `setViewMode('tree' | 'raw')`, start collapsed via the `collapsed` flag, and toggle the `showSlotList`/`showRawData` controls.

## Basic Usage

Mounts the inspector with three save slots and slot 1 selected, rendering the Slot/Size/Time table plus the Tree inspector for the selected slot's `rawData`.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A three-slot save debug inspector with slot 1 selected and its rawData shown as a key/value tree.
```

## Raw JSON View

Selects a slot and switches the inspector to pretty-printed JSON via `setViewMode()`.

```example
file: examples/RawJsonView.ts
html: examples/RawJsonView.html
title: Raw JSON View
description: Opens the autosave slot and flips the Tree/Raw toggle to Raw to dump the save blob verbatim.
```

## Slot List Only

A save-slot browser with the inspector closed and the raw view disabled.

```example
file: examples/SlotListOnly.ts
html: examples/SlotListOnly.html
title: Slot List Only
description: Shows only the Slot/Size/Time table by leaving selectedSave unset and turning off showRawData.
```

```api
```
