This is a real, unedited run of Debugging Copilot Prompts — no mockups, no cherry-picking. It's the store's whole promise: see the tool do the job before you pay for it.
demo · Debugging Copilot Prompts · 2026-07-25
PROMPT — "Root Cause from Stack Trace": Given this stack trace and my hunch, do three things: (1) reconstruct the minimal repro, (2) list the top 3 suspect causes ranked by likelihood with evidence from the trace, (3) name the single most-diagnostic experiment to run next. Ask nothing; commit to a hypothesis.
RUN — scenario: intermittent 500s on checkout
Input trace: TypeError: Cannot read properties of undefined (reading 'total') at calcTax (cart.js:88) at checkout (order.js:142) Hunch: "Only fails for guest users."
Output: ▸ Minimal repro: POST /checkout with session.user = null and a cart containing one item lacking a `pricing` object. calcTax reads order.pricing.total → undefined.total.
▸ Suspect causes (ranked): 1. Guest sessions skip the pricing-hydration middleware — trace shows `total` missing, not zero, meaning the object never loaded. (highest) 2. Race: cart saved before price service responds; guests hit it more (no cached profile). 3. Currency fallback returns undefined for guests with no locale.
▸ Most-diagnostic experiment: Log `order.pricing` at order.js:141 for 20 guest checkouts. If pricing is undefined every time → cause #1 confirmed, not a race. Two-minute test that splits the tree.
Next prompt in pack turns confirmed cause #1 into a guarded fix plus a regression test asserting pricing hydration for null-user sessions.