What problem does it solve?
Node.js bugs are hard to diagnose when console logging is too slow or can't reach closure state, so you need a breakpoint-driven way to inspect execution and values while the program is paused.
Core Features & Use Cases
- Breakpoints and step controls: Pause execution and use step in/over/out, backtrace, and source listing to pinpoint where control flow goes wrong.
- Scope and state inspection: Dump local and closure variables and evaluate arbitrary expressions in the paused frame to answer “why is this value undefined?”.
- Interactive and scripted debugging: Use the built-in node inspect REPL for quick investigation, or drive the inspector via CDP for repeatable automation and batch data collection.
Use case example: A Hermes ui-tui component misbehaves—set a breakpoint at the suspect render path, pause execution, inspect component props/hooks-local values, and evaluate the rendering conditions that lead to the wrong UI.
Quick Start
Run node inspect on your script (or start with node --inspect-brk) and use sb('path/to/file.js', lineNumber) to set a breakpoint, then continue and inspect variables with repl at the pause.