Investigating an exception
Exceptions tell you that something failed. TraceMind helps you see which execution path led there: inside the recording, beside watches and probes, not as an isolated stack dump.
When to use this workflow¶
- NullReference or InvalidOperation during a specific reproduction
- Exception only appears after a sequence of actions
- Stack trace points at a symptom line, not the originating bad state
- You need to share the failure path with someone who was not in Play Mode
Prerequisites¶
- Capture Exceptions enabled in Preferences (on by default in typical setups)
- Tracked methods along the suspected path (otherwise Exception Flow may be partial)
- A Scenario that reproduces the throw reliably
Overview¶
Step 1: Prepare the Scenario¶
- Track types involved in the failure path (owner + likely callers).
- Add Watches on state that might be null or invalid at throw time.
- Enable Probes if scene/object lifecycle could cause null state.
- Use Standard or Deep Profile. Minimal may omit detail you need.
Step 2: Record through the failure¶
- Start Recording.
- Reproduce until the exception occurs (or the invalid state immediately before it).
- Stop Recording.
Check the Scenario Console panel for recording messages if the throw did not appear in the Report.
Step 3: Locate the exception in the Report¶
Open the Report and find the exception via:
- Tree: exception nodes in the hierarchy
- Timeline: Events module markers
- Flow: exception summaries on scope nodes
Note the time and scope of the throw.
Step 4: Open Exception Flow¶
From the exception context (Tree or related drill-down), open Exception Flow.
- Use Previous exception / Next exception if multiple throws exist.
- Run Play / Pause path toward exception to walk the reconstructed path.
- Read the Inspection pane for the selected node.
Partial chains are possible
Exception Flow may show limitation notes when data is incomplete, for example: - Call chain reconstructed from exception origin only - Event graph unavailable - No tracked method linked to this exception - Caller not found in recorded executions
Treat these as guidance to widen Tracking and re-record, not as product failure.
Step 5: Correlate with Watches and Probes¶
At the exception time:
- Watch Studio: what values were held?
- Probe Map: was an object destroyed or scene unloaded just before?
- Timeline: what spiked in Methods or Execution modules?
Often the fix is state that went bad several steps before the throw line.
Step 6: Open Method Flow when structure matters¶
For a specific scope implicated in Exception Flow, open Method Flow to see call graph layout, filters, and class grouping options.
Export a PNG if the visual helps a ticket or review.
Step 7: Capture for the team¶
- Add to MindBoard: Exception reference + related Watch/Probe references.
- Note: root cause hypothesis in plain language.
- Export HTML or Markdown if the Report must attach to an issue tracker.
If Exception Flow is thin¶
| Limitation message | Action |
|---|---|
| No tracked method linked | Track the methods on the stack path |
| Caller not found | Track the caller's type |
| Origin only | Add Watches on state leading into the throw; enable probes for lifecycle |
| No exception in Report | Confirm Capture Exceptions in Preferences; confirm throw during recording |