node-network-devtools
v1.0.22
Published
Inspecting Node.js's Network with Chrome DevTools
Downloads
17,036
Maintainers
Readme
English | 简体中文
📖 Introduction
As you can see, the node program opened with the --inspect
option does not support network tags because it does not proxy user requests.
Node network devtools is designed to address this issue by allowing you to debug requests made by nodejs using the network tab of Chrome devtools, making the debugging process equivalent to a web crawler experience in the browser.
Node v22.6.0 experimentally supports network debugging. This library supports use before node v22.6.0, but the specific supported versions are unknown.
🎮 Features
- [x] HTTP/HTTPS
- [x] req/res headers
- [x] payload
- [x] json str response body
- [x] binary response body
- [x] stack follow
- [x] show stack
- [x] click to jump
- [x] base
- [x] Sourcemap
- [x] WebSocket
- [x] messages
- [x] payload
- [x] headers
- [ ] Compatibility
- [x] commonjs
- [x] esmodule
- [ ] Bun
- [ ] Deno -- Maybe nice to PR to Deno
👀 Preview
📦 Quick Start
1. Install
# npm
npm install node-network-devtools -D
# or pnpm
pnpm add node-network-devtools -D
# or yarn
yarn add node-network-devtools -D
2. Usage
Just add the following code to the entry file of your project.
import { register } from 'node-network-devtools'
process.env.NODE_ENV === 'development' && register()