How to debug Next.js with Vscode and chrome

ccsunny - Jan 27 - - Dev Community

What's AMP

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome",
      "url": "http://localhost:3001",
      "webRoot": "${workspaceFolder}"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Next.js",
      "runtimeExecutable": "npm",
      "runtimeArgs": [
        "run",
        "dev"
      ],
      "port": 9229
    }
  ],
  "compounds": [
    {
      "name": "Debug Next.js + Chrome",
      "configurations": [
        "Launch Next.js",
        "Launch Chrome"
      ]
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . .