> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prescaler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Diagnose a failure with evidence

> Turn compiler errors, snapshots and observations into a testable explanation.

Start with one observable failure: the first compiler diagnostic, a faulting instruction, an unexpected register value or a captured protocol transaction.

Attach that evidence to Ask AI from the relevant editor/tool action. Include what you expected, what happened, the configuration and the last change. Ask for a hypothesis, the evidence supporting it, and the next measurement that could disprove it.

A useful prompt is: “This is the first build error after changing the selected environment. Read the owning configuration and propose the smallest fix. Do not invent SDK functions.” For a hardware fault, attach the stack/register snapshot and matching ELF details.

Review edits in the source diff, rebuild, and rerun the failing test or measurement. An explanation without a verified result is not a completed repair.

Keep observations scoped: imported captures are historical; an SVD is documentation; a paused debugger read is a snapshot. Do not combine them into a claim of live device state.
