Debugging in Web Browser
Tested in Chrome
(sub your own .js filename for "play.js")
- Open console / cli
- Enter and run this: node --inspect-brk play.js
- Open Chrome browser
- F12 (Dev Tools)
- Find green "Node.js" icon
- Open it
- "DevTools - Node.js" window opens
- The source code should be shown, paused on the breakpoint.
- Debug-away!
Introduction To Node.js
(Chapter 901 - RunningAndDebugging)
Running And Debugging