> For the complete documentation index, see [llms.txt](https://dante-3.gitbook.io/dante-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dante-3.gitbook.io/dante-docs/modular-input-system/core-concepts/debugging-and-validation.md).

# Debugging and Validation

## Gameplay Debugger

Press the **apostrophe** key (`'`) in game and enable the **ModularInput** category. It shows, for the local player's component (or the selected debug actor's, if it is bound locally):

* the owner and the controller it is bound to,
* the active mode and the whole mode stack with priorities, then the default mode,
* open buffer windows with their age and time left,
* held inputs with their trigger event and age,
* the last 12 decisions, coloured by verdict, with reason and handling processor.

Input lives on the local player, so the category reads the local component directly instead of collecting data on the server.

## Logging

The log category is `LogModularInput`. Messages are prefixed with the function that wrote them.

| Option                            | Where                   | What it logs                                              |
| --------------------------------- | ----------------------- | --------------------------------------------------------- |
| **Log Input Events** *(advanced)* | Modular Input Component | Every captured event and its outcome, on that component.  |
| **Log Decisions**                 | Input Mode              | Every decision made while that mode is active.            |
| **Log Filter**                    | Input Mode              | Limits **Log Decisions** to these inputs. Empty logs all. |

Each decision is one line:

```
LogModularInput: UMIPS_InputComponent::RunPipeline: [BP_Hero_C_0] Input.Attack Started value=true t=12.345 frame=5821 (mode DA_Mode_OnFoot) -> Block [ModularInput.Reason.TagQuery] Owner tags [State.Stunned] do not satisfy "..." by MIPS_InputGate_TagQuery (...)
```

For binding and mode stack activity (bound, unbound, pushed, popped, window opened and closed, device changed), raise the category to **Verbose**:

```
Log LogModularInput Verbose
```

### Warnings Worth Knowing

| Message                                                         | Cause                                                                                        |
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| *...is on X, but it only works on a Pawn or a PlayerController* | The component was added to some other actor.                                                 |
| *tried to push an empty mode*                                   | **Push Mode** was called with no mode.                                                       |
| *no input config defines buffer window X*                       | A window was opened that none of the bound configs defines.                                  |
| *ignored an injected event without an input tag*                | **Inject Input Event** was given an event with no tag.                                       |
| *X has no Modular Input Component to wait on*                   | **Wait For Input** was started on an actor without a component; its **On Failed** pin fired. |

## Tracing

Each component records its recent decisions and buffer windows for the Input Monitor and the gameplay debugger.

| Aspect             | Details                                                                                   |
| ------------------ | ----------------------------------------------------------------------------------------- |
| **Compiled in**    | Development and Debug builds. Compiled out of Shipping and Test (`MIPS_WITH_TRACE` is 0). |
| **Runtime switch** | Console variable `MIPS.Trace` (default `1`). `MIPS.Trace 0` stops recording.              |
| **Capacity**       | 512 decisions and 64 windows per component; oldest entries are overwritten.               |

Logging and tracing are independent: logging works with tracing off, and in any build that keeps logs.

## Validation

### While editing

Rows in an Input Config's **Input Actions** list show an error or warning icon, with a tooltip, when a row has no tag or action, a tag is used twice, or the action is not mapped by any of the config's mapping contexts.

### On save and in the validator

Configs and modes are checked by Unreal's **Data Validation** when saved, when you run **Validate Assets** on them, and by the validation commandlet. The checks are listed on each asset's page:

* [Input Config validation](/dante-docs/modular-input-system/core-concepts/input-config.md)
* [Input Mode validation](/dante-docs/modular-input-system/core-concepts/input-modes.md)

Everything the project-wide validator finds can be intentional (contexts or configs added at runtime), so it reports warnings rather than failing the asset.

## Automated Tests

The runtime module ships automation tests for the buffer, the mode stack, the pipeline and the gameplay processors:

| Test                                          | Covers                                       |
| --------------------------------------------- | -------------------------------------------- |
| `ModularInputSystem.Buffer.PushOrderAndWrap`  | Ring order and wrap-around                   |
| `ModularInputSystem.Buffer.RemoveKeepsOrder`  | Removing from the middle keeps capture order |
| `ModularInputSystem.Buffer.Expire`            | Age expiry                                   |
| `ModularInputSystem.Buffer.ConsumeAge`        | Consuming by age                             |
| `ModularInputSystem.Buffer.Resolution`        | Newest, oldest and highest priority          |
| `ModularInputSystem.Buffer.SetCapacity`       | Resizing keeps the newest entries            |
| `ModularInputSystem.Modes.Stack`              | Push, pop, handles                           |
| `ModularInputSystem.Modes.Priority`           | Priority ordering and ties                   |
| `ModularInputSystem.Pipeline.Gates`           | Gate evaluation and verdicts                 |
| `ModularInputSystem.Pipeline.BufferOnBlock`   | Buffer On Block policies                     |
| `ModularInputSystem.Pipeline.BufferWindow`    | Window capture, resolution and replay        |
| `ModularInputSystem.Processors.MoveDirection` | Movement spaces                              |
| `ModularInputSystem.Device.TagForType`        | Device type to tag mapping                   |

Run them from **Tools > Session Frontend > Automation** by filtering for `ModularInputSystem`, or from the command line:

```
UnrealEditor-Cmd.exe <Project>.uproject -ExecCmds="Automation RunTests ModularInputSystem" -TestExit="Automation Test Queue Empty" -unattended -nullrhi
```

## Next Steps
