This document describes the current debug tooling and logging behavior.
Oxide has two separate debug/logging mechanisms.
Handled by src/debug.rs.
Characteristics:
- translated through
src/debug/i18n/ - active only in debug builds
- printed to stdout with timestamps
Typical messages:
- application starting
- terminal ready
- application launched
- application exited
- audio backend events
- translation parse fallback issues
Handled primarily from src/app.rs and rendered in src/ui/debug_terminal.rs.
Characteristics:
- detached viewport
- persistent live log buffer during the session
- searchable log output
- export to
.txt/.log - test report generation
Current terminal features include:
- live log display
- search field
- export logs button
- test report button
- localized title and labels
- theme-aware rendering
- shortcut handling while terminal is focused
emit_test_report() produces a compact diagnostics block intended for ROM testing.
Typical report content:
- trigger source
- ROM label
- running / paused / ROM loaded flags
- current PC / opcode / I / SP / timers
- lit pixel count
- keypad state summary
- quirk preset and individual flags
- full register dump
Oxide keeps rotating on-disk log files under:
logs/app/logs/emulator/
Behavior on startup:
- if
latest.logsexists, it is archived into a timestamped.zip - a fresh
latest.logsfile is opened for the new session
These are different:
- rotating logs are automatic and session-based
- exported logs are user-triggered from the debug terminal
The terminal is useful for:
- checking startup flow
- validating runtime status transitions
- diagnosing ROM issues
- confirming quirk presets in effect
- inspecting save/load state behavior
- checking audio initialization success/failure
Debug strings are not stored in the main UI translation files.
They use:
src/debug/i18n/common.jsonsrc/debug/i18n/<lang>.json
This keeps debug output independent from user-facing UI text.