node:inspector
The Node.js module and debugging interface that speaks the Chrome DevTools Protocol, for attaching debuggers and profilers.
In more detail
Starting node with --inspect lets Chrome DevTools connect; the node:inspector module lets a program profile itself through a Session. Disconnect sessions when done, since active profilers slow the process.
Related terms
- Chrome DevTools Protocol — The protocol Chrome DevTools uses to control and inspect a JavaScript runtime, with commands grouped into domains such as Profiler and HeapProfiler.
- CPU profile — A recording of where a program spent its CPU time, made by sampling the call stack many times per second.
- Chrome DevTools — The developer tools built into the Chrome browser for debugging, profiling and inspecting memory.
Taught in
- Diagnostic Profiling: CPU Profiler & Heap Snapshots — Node.js Internals & Backend Services