Getting started with Node's profiling

suggest change

Introduction

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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents