How to debug Next.js with Vscode and chrome

ccsunnydev

ccsunny

Posted on January 27, 2024

How to debug Next.js with Vscode and chrome

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
đź’– đź’Ş đź™… đźš©
ccsunnydev
ccsunny

Posted on January 27, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related