explaingit

node-inspector/node-inspector

12,646JavaScriptAudience · developerComplexity · 1/5Setup · easy

TLDR

A legacy browser-based debugger for Node.js that connected Chrome DevTools to a running server process, now superseded by the built-in debugger included in Node.js since version 6.3.

Mindmap

mindmap
  root((node-inspector))
    What it does
      Node.js debugging
      Chrome DevTools UI
      Browser-based
    Debugging Features
      Breakpoints
      Step through code
      Variable inspection
      CPU profiling
    Limitations
      Chrome only
      Large buffer bugs
      Multi-process limits
    Status
      Superseded v6.3
      Use node inspect
    Audience
      Node.js developers
      Backend engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Step through Node.js server-side code line by line using a visual Chrome DevTools debugger in the browser.

USE CASE 2

Set conditional breakpoints and inspect variable values inside a running Node.js process without adding console.log statements.

USE CASE 3

Profile CPU usage of a Node.js application to identify slow functions using a built-in browser profiling interface.

USE CASE 4

Attach a debugger to a Node.js process running on a remote server without needing to be on the same machine.

Tech stack

JavaScriptNode.jsChrome DevTools

Getting it running

Difficulty · easy Time to first run · 5min

Deprecated, Node.js 6.3 and later include a built-in debugger, use node --inspect instead of this package.

In plain English

Node Inspector was a debugging tool for Node.js applications that let developers inspect and step through their server-side JavaScript code using a browser-based interface. It worked by connecting Chrome's developer tools to a running Node.js process, giving you the same visual debugging experience you would get when inspecting code in a web browser. The feature list covered most of what developers need during debugging: setting breakpoints with optional trigger conditions, stepping through code line by line, inspecting variables and object properties, viewing console output, and profiling CPU and memory usage. You could also edit code while it was running, with an option to save those changes back to disk. Remote debugging was supported, meaning the browser did not need to be on the same machine as the Node.js process. Setup was a single npm install command, and a second command called node-debug would launch your application and open the debugger in the default browser. Only Chrome and Opera were supported, other browsers would not work with the interface. An important note in the README: as of Node.js version 6.3, Node.js itself includes a built-in debugger based on the same DevTools technology. The project authors state that this built-in option mostly replaces Node Inspector and is developed directly by the team behind the V8 JavaScript engine. They recommend the built-in debugger for anyone getting started today, noting it supports advanced features such as long and async stack traces that are difficult to implement externally. The repository is still publicly available and the README documents the original features, known issues (such as problems with large Buffer objects and debugging multiple processes running in parallel), and troubleshooting steps for common setup problems.

Copy-paste prompts

Prompt 1
My Node.js app crashes with an unhandled promise rejection in a nested async function. Show me how to use the modern built-in Node.js debugger to set a breakpoint and inspect the call stack.
Prompt 2
I want to profile the CPU usage of my Express.js route handler to find which function is slow. Walk me through using the node --inspect flag with Chrome DevTools to record a CPU profile.
Prompt 3
Show me how to attach a remote debugger to a Node.js process running inside Docker so I can step through code from Chrome DevTools on my laptop.
Prompt 4
I need to find a memory leak in my Node.js server. Walk me through taking a heap snapshot using node --inspect and identifying leaking objects in Chrome DevTools memory view.
Open on GitHub → Explain another repo

← node-inspector on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.