In plain words
A stack trace is the list under an error that shows which function called which, so you can follow the trail back to your own code.
Where you see it
The indented lines starting with "at" under an error in the console or in your Vercel function logs. The top line is where it broke; each line below is the code that called it.
What goes wrong
- Blaming the library at the top
Sometimes the top lines point inside React or Next.js. The bug is usually in the first line that points at one of your own files.
- Sharing only the first line
The first line says what broke, but the same message can come from a dozen places. The lines underneath say which function and which caller, so paste all of it.
- Line numbers that don't match your files
On a live site the code is minified, squeezed into a few compact files, so the trace points at names like index-a1b2c3.js. Reproduce the error in the dev preview, where it points at your real files.
What to tell your agent
Quick check
Sign in to earn +10 XP for itA trace starts with three lines in node_modules/react-dom, then one in src/components/Cart.tsx. Where do you look first?