Skip to content

Instantly share code, notes, and snippets.

@PauloLuan
Last active April 8, 2024 12:12
Show Gist options
  • Save PauloLuan/63e9470bfec32b1103e8495ebc4736af to your computer and use it in GitHub Desktop.
Save PauloLuan/63e9470bfec32b1103e8495ebc4736af to your computer and use it in GitHub Desktop.
Debug nextjs on browser
NODE_OPTIONS='--inspect' next dev
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment