Svelte · Senior · Question 57 of 75
What is a good way to debug unexpected re-runs in Svelte 5?
- ✓Correct answer:
$inspect.trace()at the top of the effect or derived, plus Svelte DevTools to inspect component state - 2Add
console.logto every line - 3Switch back to Svelte 4
Explanation
The trace shows which dependency changed, which usually reveals an accidental read.