A stack trace tells you where an error happened, not how your driver got there. For bugs that depend on sequence or timing — a callback that runs in the wrong order, a proxy command that arrives before the driver is ready, a property that was set to something unexpected just before the failure — the trail of events leading up to the error is usually the thing you most want to see.
Anvil would automatically capture a rolling trail of recent activity for every driver instance: C4:* API calls, callback entries, property changes, timers, proxy messages, and outbound network requests, each with a timestamp and the relevant arguments. When your driver throws an error, or you call the Anvil SDK to capture one, the most recent slice of that trail goes along with the report. The stack trace shows the point of failure; the breadcrumb trail shows the run-up.
You can also add breadcrumbs of your own wherever something significant happens in your driver — a user action, a state transition, a branch in business logic — so the trail reflects meaningful moments rather than just raw API calls. The trail lives in memory on the controller and is only transmitted when it's attached to an error, so there's no steady stream of data leaving the device in the background. In the UI, breadcrumbs for an error can be filtered, searched, and expanded to show the full arguments for a specific call.
What we're thinking:
  • Automatic capture: C4 API calls, callback entries, property changes, timers, network requests, proxy messages
  • A simple SDK call to add your own breadcrumbs with a category, message, level, and arbitrary data
  • Configurable buffer size (default around 100 events)
  • Trail transmitted only when attached to an error — no ambient bandwidth cost
  • Timeline view in the UI with filtering by type and free-text search
  • Automatic redaction of sensitive patterns (tokens, credentials) before transmission
  • Option to disable specific automatic capture types if they're noisy for your driver
Help us shape this:
  • Which kinds of automatic breadcrumbs would be most useful to you — C4 API calls, proxy messages, property changes, something else?
  • Would you prefer a longer trail (more history, bigger error payloads) or a shorter one (lighter, less context)?
  • When you've debugged a tricky sequencing bug in the past, what did you wish you could see at the moment of failure?