node-devtools-cli
Node DevTools CLI
Command-line interface for non-blocking debugging of Node.js backend processes. Connects via the Inspector Protocol (Chrome DevTools Protocol) and provides tracepoints, logpoints, exceptionpoints, and watch expressions without pausing execution.
Installation
Same package as browser-devtools-mcp:
npm install -g browser-devtools-mcp
Quick Start
# 1. Start daemon (if not running)
node-devtools-cli daemon start
# 2. Connect to a Node.js process (by PID)
node-devtools-cli --session-id my-debug debug connect --pid 12345
# 3. Set a tracepoint on server.js line 42
node-devtools-cli --session-id my-debug debug put-tracepoint \
--url-pattern "server.js" \
--line-number 42
# 4. Trigger the code path (e.g., make API request to your app)
# 5. Get captured snapshots
node-devtools-cli --session-id my-debug --json debug get-probe-snapshots
Global Options
| Option | Description | Default |
|---|---|---|
--port <number> |
Daemon server port | 2020 |
--session-id <string> |
Session for Node connection persistence | auto |
--json |
Output as JSON (recommended for AI) | false |
--quiet |
Suppress log messages | false |
--verbose |
Enable debug output | false |
--timeout <ms> |
Operation timeout | 30000 |
AI Agent Recommended:
node-devtools-cli --json --quiet --session-id "debug-session" <command>
Tool Domains
| Domain | Description | Reference |
|---|---|---|
| debug | Connection, tracepoints, logpoints, exceptionpoints, watch, snapshots |
Connection Methods
Connect via debug connect with one of:
| Method | Option | Example |
|---|---|---|
| PID | --pid <number> |
--pid 12345 |
| Process name | --process-name <pattern> |
--process-name "server.js" |
| Docker container | --container-id or --container-name |
--container-name my-api |
| Inspector port | --inspector-port <number> |
--inspector-port 9229 |
| WebSocket URL | --ws-url <url> |
--ws-url "ws://127.0.0.1:9229/abc" |
If the process doesn't have --inspect active, the CLI activates it via SIGUSR1 (no code changes). For Docker: expose port 9229 and use --inspect=0.0.0.0:9229.
CLI Management Commands
Daemon
node-devtools-cli daemon status
node-devtools-cli daemon start
node-devtools-cli daemon stop
node-devtools-cli daemon restart
node-devtools-cli daemon info
Session
node-devtools-cli session list
node-devtools-cli session info <session-id>
node-devtools-cli session delete <session-id>
Tools
node-devtools-cli tools list
node-devtools-cli tools search <query>
node-devtools-cli tools info <tool-name>
Config & Updates
node-devtools-cli config
node-devtools-cli update --check
Examples
Connect by PID
SESSION="--session-id api-debug"
# Connect
node-devtools-cli $SESSION debug connect --pid $(pgrep -f "node server.js")
# Set tracepoint on route handler
node-devtools-cli $SESSION debug put-tracepoint \
--url-pattern "routes/api.ts" \
--line-number 25
# Trigger: curl http://localhost:3000/api/users
# Get snapshots
node-devtools-cli $SESSION --json debug get-probe-snapshots
Connect by Process Name
node-devtools-cli debug connect --process-name "api"
Docker Container
# App runs in container with -p 9229:9229
node-devtools-cli debug connect \
--container-name my-node-app \
--host host.docker.internal \
--inspector-port 9229
Exception Catching
SESSION="--session-id exc-debug"
node-devtools-cli $SESSION debug connect --pid 12345
node-devtools-cli $SESSION debug put-exceptionpoint --state uncaught
# Trigger error in app
# Check snapshots
node-devtools-cli $SESSION --json debug get-probe-snapshots --types exceptionpoint
Interactive Mode
node-devtools-cli interactive
| Command | Description |
|---|---|
help |
Show commands |
exit, quit |
Exit |
debug connect |
Connect to process |
debug status |
Connection status |
<domain> <tool> |
Execute tool |
Shell Completions
eval "$(node-devtools-cli completion bash)"
eval "$(node-devtools-cli completion zsh)"
More from serkan-ozal/browser-devtools-skills
react-debugging
Debug React applications by inspecting components, props, and the component tree. Use when the user is debugging React apps, wants to inspect component props/state, find which component renders an element, or understand the React component hierarchy.
42browser-testing
Automated browser testing, interaction automation, and form testing. Use when the user needs to test web pages, automate browser interactions, fill forms, test validation, run multi-step wizards, or test login/signup flows.
39visual-testing
Visual testing, UI verification, and design comparison using screenshots and Figma integration. Use when the user wants to verify UI appearance, compare with Figma designs, test responsive layouts, check for visual regressions, or validate design implementation.
37browser-devtools-cli
Automates browser interactions using Playwright for web testing, debugging, and automation. Use when the user needs to navigate websites, take screenshots, fill forms, click elements, extract page content (HTML/text), audit accessibility (ARIA/AX tree), measure Web Vitals performance, monitor console logs and HTTP requests, mock API responses, execute JavaScript in browser, inspect React components, compare UI with Figma designs, or perform non-blocking debugging with tracepoints, logpoints, and exception monitoring.
36debugging
Debug web and Node.js applications using console inspection, network analysis, and non-blocking code debugging. Use when the user reports bugs, wants to debug JavaScript (browser or backend), inspect network requests, troubleshoot page/API issues, trace function calls, or monitor exceptions.
30performance-audit
Analyze web and backend performance using Web Vitals, network timing, and Node.js metrics. Use when the user asks about page performance, load times, Core Web Vitals (LCP, CLS, INP), slow pages, backend bottlenecks, or SEO performance factors.
30