Open adamczykjac opened 1 week ago
If you're using the default package.json dev script with cross-env, you may need to pass down the NODE_OPTIONS that VSCode would typically inject when a debugging session is started.
e.g.
"dev": "cross-env NODE_OPTIONS=\"${NODE_OPTIONS} --no-deprecation\" next dev
"
it works as a charm! Would you mind if I create a PR to the Payload 3.0 demo repo with that line changed? I'm stunned that people are not experiencing that too. How do y'all debug your apps at all :D ?
Link to reproduction
https://github.com/payloadcms/payload-3.0-demo
Payload Version
3.0.0-beta.52
Node Version
20.15.0
Next.js Version
15.0.0-rc.0
Describe the Bug
Out of the box, I can't possibly get VS Code debugging to work, resulting in unbound breakpoints:
With the help of this comment, I only managed to prove that there are indeed no project sourcemaps visible in the Debug Diagnostic view (available when in Debugging mode from Command Palette):
Tried almost everything from this topic - with
sourceMapPathOverrides
inlaunch.json
, changingcwd
. Nothing worked.Reproduction Steps
src/app/(app)/page.tsx:7
or insrc/app/my-route/route.ts:13
localhost:3000
orlocalhost:3000/my-route
, respectively to point no. 3Adapters and Plugins
No response