Tech
Debugging Node.js Like a Pro
Start with the Built-in Inspector
Before reaching for external tools, remember Node.js has a built-in debugger. Run your script with --inspect and open chrome://inspect in Chrome to get a full DevTools experience: breakpoints, step-through, console, and even memory profiling.
node --inspect app.js
For a quick breakpoint without touching the browser, use --inspect-brk to pause on the first line. This is great for debugging startup issues.
Use debugger S...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to