Debug Node.js with inspect and profiling

node-inspect-debuggerskillsetup L2★377,536
openclaw/openclaw ↗
What it does

Debug Node.js with inspector, breakpoints, heap, and CPU profiles

Best for

Flaky tests and memory leaks where automated heap snapshots and CPU profiles beat console.log debugging.

Inputs
  • · script path or PID
  • · breakpoint location
  • · profile type
Outputs
  • · debugger REPL output
  • · heap/CPU profiles
  • · source-map aware stack traces
Requires
  • · Node.js inspector protocol
  • · chrome-remote-interface
Preconditions

Node process with --inspect or --inspect-brk flag; CDP port accessible

Failure modes
  • · port already in use
  • · source map unavailable
  • · async context loss in REPL
Trust signals
  • · CDP code examples provided
  • · port configuration safety notes
  • · child-process debugging guidance