While following the nextjs doc and Next.js: debug server-side
launch configuration for windows, I was also getting same issue while trying to debug server side code.
I was able to fix it by removing the --turbopack
from the package.json
.
I was working on nextjs-dashboard sample application which already has this in package.json: https://github.com/vercel/next-learn/tree/main/dashboard/starter-example
Eg.
"scripts": {
"build": "next build",
"dev": "next dev --turbopack", # remove this --turbopack
"start": "next start"
},
I am new to nextjs so don't know what effect does --turbopack
creates and why removing it fixed the debugging breakpoint issue. But my gut feeling says that there has to be some fix