Debugging and Profiling

console.log answers one question at a time. When a value is wrong three frames deep, when a request that should take 5 ms takes 500 ms, or when resident memory climbs for six hours until the container is killed, you need the runtime to tell you what it is doing. Node ships every tool for that in the box: a debugger that speaks the same protocol as Chrome DevTools 3,948 , a sampling CPU profiler, a heap snapshot writer, an event loop delay histogram, a diagnostic report and a trace recorder. No agent, no paid service, no code change.

Front-End Web Development covered Chrome DevTools for front-end work. The panels are the same here, but they attach to a V8 86,723 isolate with no DOM, no window and no page to reload, over a WebSocket rather than the browser's own plumbing. This section stays on the Node side of that line. Every transcript below is real output, produced on Node.js 25.8.0 2,131 on Windows.

Subsections