Open smoothdvd opened 2 months ago
I have been trying for a couple of days with no success on debugging, except for the bare minimum of setting an endpoint in 'tsx' files.
Ideally would be having the 'attach to' possibility since we are preparing migration to version 3, and all our logic is on endpoints/hooks. We are just a service/graphql endpoint.
An example on how to set up debugger would be highly appreciated. I already checked Nextjs docs and https://github.com/payloadcms/payload-3.0-demo this repo. But something is missing in my case.
remove NODE_OPTIONS=--no-deprecation to make the VSCode debugger bind breakpoints correctly
or
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"cwd": "${workspaceFolder}/apps/api",
"sourceMaps": true,
"command": "pnpm exec next dev"
},
]
}
Link to reproduction
No response
Environment Info
Describe the Bug
I want to debug the payload 3.0 project in vscode, using the launch file:
But there is no source map files generated, so the breakpoint is not be intercepted.
Reproduction Steps
Run with debug in vscode and set a breakpoint at the code in my-route.ts
Adapters and Plugins
No response