The Dashcam Workflow
The dashcam workflow is Theatre's flagship debugging pattern. It mirrors how dashcams work in cars: always recording, you review the footage only when something happens.
The idea
You play your game normally. When a bug occurs, you press a key to mark the moment. Later, your AI agent scrubs through the spatial recording to find what happened — velocities, positions, property states — at the exact frame the bug occurred.
You do not need to narrate the bug to the agent. You do not need screenshots. You do not need to add print statements and replay. The agent reads the spatial timeline directly.
The keyboard shortcuts
| Key | Action |
|---|---|
| F9 | Mark the current frame as a bug moment |
| F11 | Pause / unpause recording |
These shortcuts are active while the game is running. They are handled by the Spectator editor dock — they work whether you are focused on the game window or the Godot editor.
Use the editor dock's Record button to start and stop recording. You can also trigger marking via the dock UI's Mark Bug button. From the agent side, use the clips tool's "start" and "stop" actions.
A complete debugging session
Here is a real debugging story, from start to finish.
The bug
You have a stealth game. Enemies have a detection cone — an Area3D shaped roughly like a forward-facing triangle. When the player enters the cone, the enemy alerts. But sometimes, enemies that should clearly see the player do not alert. You cannot reproduce it reliably.
Step 1: Enable continuous recording
Start the game, then click Record in the Spectator dock immediately. The dock shows "Recording: clip_stealth_01". Now every physics frame is captured.
Play normally. Move around. Do some stealth sections. Wait for the bug to occur.
After about 45 seconds of play, you see it: you walk directly in front of an enemy at close range, the enemy's eyes do not move, no alert. You immediately press F9 to add a marker. The dock shows "Marker: frame 2712 — enemy_missed_player".
Continue playing for a few more seconds, then click Stop in the dock (or call clips { "action": "stop" }).
Step 2: Start the investigation
Step 3: Query the relevant window
Step 4: Find the cause
Step 5: Confirm with source
Step 6: Apply the fix
The agent opens enemy_patrol.gd, removes the monitoring = false line, and saves. On the next test run, the detection works correctly.
What made this work
- Always-on recording: because you started recording before the bug, you have data from the moment it began, not just after you noticed it
- Frame marker: pressing F9 gave the agent a precise frame to anchor the search
- Condition filtering: querying only frames where
monitoring == falsefound the transition in one call instead of scanning 2,800 frames manually - Temporal reasoning: the agent found that the flag changed 0.9 seconds before the visible failure — the root cause was upstream of the symptom
Workflow variations
Quick investigation (no marker)
If the bug is obvious and repeatable, you do not need a marker:
- Click Record in the dock (or call
clips { "action": "start" }) - Trigger the bug
- Click Stop in the dock
- Ask the agent: "The bug happens around the end of the recording. Find the anomaly."
Continuous background recording
Enable continuous recording in the Spectator config so recording always starts with the game:
{
"auto_record": true,
"max_clip_duration_s": 120
}Now every session is automatically captured. You only need F9 to mark bug moments.
Post-playtest analysis
After a playtest session where you were not at the keyboard:
- Have the tester click Record in the dock when they start playing
- Have them press F9 whenever something seems wrong
- Collect the clip files afterward
- Ask the agent to analyze all markers in the clip
Regression testing
Record a "golden run" of expected behavior. Record a later run where something changed. Ask the agent to compare the two clips for anomalies.