The following steps work for me:
- start the app with next (
npm run dev
or whatever your start script looks like) - add breakpoints, create JavaScript Debug run configuration, specify
http://localhost:3000
URL - debug
If you like to debug the code that is executed on the server side, I’d suggest using the Node.js run configuration with node_modules\next\dist\bin\next
specified as Javascript file:
You can then debug both Node.js and Javascript Debug run configurations to get both server-side and client-side code debugged.