Node.js · Junior · Question 69 of 75

How do you debug a Node.js app in Chrome DevTools or VS Code?

Explanation

--inspect opens the inspector protocol; --inspect-brk also pauses on the first line. In Chrome, open chrome://inspect. A debugger; statement sets a breakpoint in code.

Further reading

Problem with a question

Node.js · Junior · question 69

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz