Overview - Debugging with {@debug}
What is it?
In Svelte, {@debug} is a special tag that helps you see the current values of variables while your app runs. It shows these values right in the browser console automatically. This makes it easier to find mistakes or understand how your app changes over time without adding extra code.
Why it matters
Without {@debug}, developers often add many manual console.log statements to check variable values, which can clutter code and slow down debugging. {@debug} simplifies this by showing variable states clearly and temporarily, helping you fix problems faster and write better apps.
Where it fits
Before learning {@debug}, you should know basic Svelte syntax and how to create reactive variables. After mastering {@debug}, you can explore more advanced debugging tools like browser DevTools and Svelte DevTools extensions.