microsoft / vscode-recipes

MIT License
5.86k stars 577 forks source link

NextJS debugging recipe not working / needs updating. #312

Closed hamatoyogi closed 2 years ago

hamatoyogi commented 3 years ago

Tried https://github.com/microsoft/vscode-recipes/tree/main/Next-js and it does not work. using attach for the node process works for server debugging, but when adding this config:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "attach",
      "name": "Launch Program",
      "skipFiles": ["<node_internals>/**"],
      "port": 9229
    },
    {
      "type": "chrome",
      "request": "launch",
      "name": "Next: Chrome",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}"
    }
  ],
  "compounds": [
    {
      "name": "Next: Full",
      "configurations": ["Next: Node", "Next: Chrome"]
    }
  ]
}

Still not able to debug browser after setting breakpoints in VScode.

Is it possible to update the recipe or help me set this up please?

connor4312 commented 2 years ago

I cannot reproduce this. Please share an example where you see this happening. Bear in mind that in many cases code in Next.js is only executed on the server side.