vite-browser-runtime-diagnostics
vite-browser-runtime-diagnostics
Use this skill when runtime behavior is the likely cause. Prefer it over component inspection when timing and recent updates matter.
Standard sequence
vite-browser vite runtime
vite-browser errors --mapped --inline-source
vite-browser correlate errors --mapped --window 5000
vite-browser correlate renders --window 5000
vite-browser diagnose propagation --window 5000
vite-browser diagnose hmr --limit 50
vite-browser vite hmr trace --limit 50
vite-browser vite module-graph --limit 200
vite-browser vite module-graph trace --limit 200
In v0.3.3+, errors --mapped --inline-source is also the right first read for browser-side runtime failures that never appear in the Vite overlay. Do not assume no errors means the page is healthy unless logs and the visible browser state agree.
Use diagnose propagation first when the question is about rerenders, component paths, store changes, or "what update actually flowed into this failure". Treat its output as a high-confidence propagation clue, not strict causal proof. Use diagnose hmr first when the problem still looks primarily transport/HMR-layer.
Diagnostic patterns
HMR instability
vite hmr clear- Reproduce once
vite hmr trace --limit 50- Flag
full-reloador repeatederrorevents.
Module churn
vite module-graph clear- Capture baseline:
vite module-graph - Trigger one change or one navigation
vite module-graph trace- Inspect unexpectedly added/removed modules.
Recent update caused failure
- Reproduce once after the failure.
correlate errors --mapped --window 5000- Identify whether the current error overlaps with recent HMR-updated modules.
- Inspect the highest-confidence matching module first.
Store or component propagation
- Reproduce once after the visible failure.
- Wait briefly for queued render/store events to settle if reproduction was driven by a live interaction or hot update. A short delay such as ~300ms is usually enough, though
v0.3.3+is more tolerant of sparse store-side evidence and missing browser-side HMR events in Vue/Pinia repros. correlate renders --window 5000diagnose propagation --window 5000- Use
Store Updates,Changed Keys, andRender Pathto choose the first store/component to inspect. - If the output is inconclusive or says no trace is available, keep the conclusion conservative and do not overstate a causal chain.
Stack mapping
errors --mapped- If mapping is still ambiguous, run
errors --mapped --inline-source. - Use mapped file:line as the fix entrypoint.
Automated diagnosis
diagnose hmr --limit 50- Review rule hits for
missing-module,circular-dependency,hmr-websocket-closed, andrepeated-full-reload. - Use the highest-confidence
failitem first. - Treat
warnitems as supporting evidence, not primary root cause.
Output format
Always provide:
- Runtime state summary (
vite runtime) - Most likely runtime cause
- Diagnosis hits with status and confidence
- Error/HMR correlation conclusion
- Render/component propagation conclusion
- HMR timeline conclusion
- Module-graph delta conclusion
- Final mapped source location(s)
- Suggested fix order
When to switch skills
If diagnosis reveals the root cause is actually:
- Component state or framework-specific issue (wrong props, store state, router) → switch to
vite-browser-core-debug - Network/API issue (wrong data, failed requests, CORS, auth) → switch to
vite-browser-network-regression - Need final pre-release validation → switch to
vite-browser-release-smoke