Replies: 1 comment
-
|
Got it working soon after I asked this, but for reference, this is the launch configuration I had and it didn't work: {
"name": "Next.js: debug full stack",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/next",
"runtimeArgs": ["--inspect"],
"skipFiles": ["<node_internals>/**"],
"serverReadyAction": {
"action": "debugWithEdge",
"killOnServerStop": true,
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"webRoot": "${workspaceFolder}"
}
},Here's the configuration that worked (including source maps): {
"name": "Next.js: debug full stack",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/next/dist/bin/next",
"args": ["dev", "--turbopack", "-p", "3002"],
"runtimeArgs": ["--inspect"],
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}",
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**", "!**/dist/**"],
"serverReadyAction": {
"action": "debugWithEdge",
"killOnServerStop": true,
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"webRoot": "${workspaceFolder}"
}
},difference is in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone 👋
I'm trying to debug a Next.js API using this plugin. I installed it through LazyVim. The UI shows up fine, I can attach to my
next devthread which I'm starting like this:I'm using d Attach to attack to this process, after which I see the message in the terminal where this command is running:
I think nvim-dap is attached to the correct session because when I terminate it terminates the thread in the terminal session.
Breakpoints also show up, so i don't think this is a source map issue (I also see no errors when I try to register a breakpoint)
However, breakpoints don't trigger. They trigger when I inspect the same route from the Chrome debugger.
Can you help me with this? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions