- Notifications
You must be signed in to change notification settings - Fork5
Inspecting Node.js's Network with Chrome DevTools✨
License
GrinZero/node-network-devtools
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
English |简体中文
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.
- HTTP/HTTPS
- req/res headers
- payload
- json str response body
- binary response body
- stack follow
- show stack
- click to jump
- base
- Sourcemap
- WebSocket
- messages
- payload
- headers
- Compatibility
- commonjs
- esmodule
- Deno -- Maybe nice to PR to Deno
- Undici
- undici.request
- undici.fetch
# npmnpm install node-network-devtools -D# or pnpmpnpm add node-network-devtools -D# or yarnyarn add node-network-devtools -D
Just add the following code to the entry file of your project.
import{register}from'node-network-devtools'process.env.NODE_ENV==='development'&®ister()
To stop debugging network requests and eliminate side effects, just use the return value of theregister
method for cleanup.
import{register}from'node-network-devtools'constunregister=register()unregister()
About
Inspecting Node.js's Network with Chrome DevTools✨
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.