Appearance
Debugging & Mistakes
Using the dev debugger, and what the engine does when you make a mistake.
Dev Debugger
The dev debugger is available in development builds only (npm run dev). Press ` (backtick) to toggle it open.
Panels
| Panel | Contents |
|---|---|
| Trace | Recent passage navigation history (read-only). |
| Vars | All $ global variables with live editable values. Temp vars (_name) from the last passage execution appear below as a read-only section. |
| Passages | Searchable list of all passages in the game (display only). |
| Hooks | Wrappers and hook injections registered for the current passage. |
Below the tab panels sits a permanent Eval section, always visible regardless of which tab is active. Type any Ana expression or macro call and press Ctrl+Enter (or the Run button). Results accumulate as a scrollable history log; click any past entry to re-populate the textarea.
The debugger state (open/closed, active panel) persists across page reloads via localStorage.
When You Make a Mistake
Ana's error behavior, in one place:
| Situation | What happens |
|---|---|
(set:) a variable to a different type than declared | Hard runtime error, surfaced in the dev console with passage + line. |
(get:) a property that doesn't exist | Returns undefined and never throws. (if: (get: $item, _id, "poisoned")) is just falsy. |
(goto:) / (update:) / (action:) to a passage that doesn't exist | Logged as a navigation error; in dev the validator flags it ahead of time. In production the navigation is a no-op rather than a crash. |
| Rendering to a zone the current layout doesn't define | The output is discarded with a console warning (dev). |
| Overlapping schedule entries for the same group | Throws at registration time, so you catch it during authoring. |
(break:) / (continue:) outside a loop | Ignored, with a dev warning and a validator warning. |
Run npm run parse and open the dev debugger (backtick) early and often; most mistakes surface there before a player ever sees them.