Causality in TraceMind
Traditional debugging often tells you that something went wrong. TraceMind is built to help you investigate why by connecting events, execution, value changes, and consequences into a story you can walk.
The investigation question stack¶
Most runtime bugs are not single-line failures. They are chains:
flowchart TD
A[Event] --> B[Execution]
B --> C[Change]
C --> D[Consequence]
| Layer | What you ask | TraceMind surfaces |
|---|---|---|
| Event | What happened in the environment? | Probes, Probe Map, Timeline Events |
| Execution | What code ran, and in what order? | Tree, Flow, Method Flow, scopes |
| Change | What value moved, and when? | Watches, Watch Studio |
| Consequence | What broke or misbehaved because of it? | Exceptions, Exception Flow, your hypothesis on MindBoard |
TraceMind does not replace your judgment. It gives you durable evidence and specialized views so you can assert causality with confidence.
Where causality appears in the product¶
Watch Causal Flow
The primary answer to why did this property write happen? TraceMind reconstructs the managed call path behind a watched value change and presents it as a walkable graph with roles such as Entry, Call, Cause, Getter, Boundary, and the final Watched property.
Modes: Full Flow (every change on the watch) and Individual (one selected change).
Method Flow
Call structure for a scope or causal chain. Use it when you need to see how methods called each other around a moment, not only which write landed.
Exception Flow
The failure path toward an exception. Use it when the symptom is a throw and you need the surrounding execution story, not a flat stack trace.
Runtime Story
Contextual narrative around a focused Watch, Probe, Method, or Exception. Shows related and nearby activity so you can place one event inside the wider recording.
MindBoard relationships
Your explicit assertions between notes and references: Caused By, Triggered, Supports, Contradicts, and others. TraceMind never auto-claims causality on the board; you state what you believe and link the evidence.
Causal chain roles (Watch Causal Flow)¶
When you open Causal Flow from Watch Studio, nodes use a shared vocabulary:
| Role | Meaning |
|---|---|
| Entry | Where the story begins: the initiating context |
| Call | A method invocation along the path |
| Cause | A step that contributed to the outcome |
| Getter | A read that fed the write path |
| Boundary | A meaningful crossing between systems or layers |
| Watched property | The value change you are explaining |
Narrate the chain out loud
If you can describe the path from entry to write in plain language, you are ready to fix the bug or ask a precise follow-up question.
What causality requires from your Scenario¶
Causal views are only as complete as the capture that produced them.
A Watch on the symptom member
Without a Watch, there is no watched write to explain.
Tracking on relevant methods
Missing callers disappear from the chain.
Recording during the write
The change must occur while recording is active.
Sufficient Profile depth
Minimal may omit detail you need; raise to Standard or Deep when chains look shallow.
Watch causal capture (Preferences)
Compact (default) or Full managed stack capture after confirmed value changes.
A simple mental model¶
Scenario → defines what to capture
Recording → Play Mode reproduction
Report → durable evidence
Surface → Tree / Timeline / Watch Studio / Causal Flow / Probe Map
Conclusion → MindBoard note + relationships