I'm currently trying to debug a Next.js Application inside a NX monorepo.
I have enabled the Auto Attach
setting in VSCode's User Settings.
When I start the Application using the serve command, I can see output in the Debug Console and also print out the current process by typing process
or console.log(process)
into the Debug Console.
However, I cannot set any breakpoints in the server side code, for example in getServerSideProps
.
I checked Next.js Debugging Documentation for the missing pieces, and tried setting the NODE_OPTIONS='--inspect'
in my Next.js Application via .env file.
Update: Seems like it's a missing feature on NX.