Getting started with Node's profiling
suggest changeIntroduction
The aim of this post is to start profiling a Node.js application and to read the results when tracking a bug or a memory leak. A running Node.js process is a V8 isolate, in many ways like a page in a browser, so the same runtime metrics are available.
Chrome DevTools can attach to that process. The old node-inspector package often fails on current Node. Prefer node --inspect, then open chrome://inspect.
Remarks
If DevTools does not show the process, confirm Node was started with --inspect and refresh the chrome://inspect tab. A breakpoint appears only after the inspector has attached.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents