6

I can't get any debug config to work with breakpoints and nextJS using typescript… Does anyone have one to share with me ?

Thanks

3
  • 1
    This actually works! Just a note, not to run the npm dev option. This will start and compile the server too. Commented Dec 8, 2020 at 0:24
  • 1
    I can confirm. Top-voted answer works, but using npm run dev as officially documented does not. Commented Feb 10, 2022 at 22:16
  • Same with @700Software, the official documentation was not working for me but the voted answer does! Commented Jan 1, 2023 at 3:25

1 Answer 1

4

This is my .vscode/launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/node_modules/next/dist/bin/next"
    }
  ]
}

Working for me with Next.js v9.4.4 in June 2020.

Sign up to request clarification or add additional context in comments.

1 Comment

Works for me with Next 10 too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.