forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: nodejs#51462 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
- Loading branch information
1 parent
952f3b4
commit 6f7b407
Showing
31 changed files
with
2,924 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Debug | ||
|
||
Undici (and subsenquently `fetch` and `websocket`) exposes a debug statement that can be enabled by setting `NODE_DEBUG` within the environment. | ||
|
||
The flags availabile are: | ||
|
||
## `undici` | ||
|
||
This flag enables debug statements for the core undici library. | ||
|
||
```sh | ||
NODE_DEBUG=undici node script.js | ||
|
||
UNDICI 16241: connecting to nodejs.org using https:h1 | ||
UNDICI 16241: connecting to nodejs.org using https:h1 | ||
UNDICI 16241: connected to nodejs.org using https:h1 | ||
UNDICI 16241: sending request to GET https://nodejs.org// | ||
UNDICI 16241: received response to GET https://nodejs.org// - HTTP 307 | ||
UNDICI 16241: connecting to nodejs.org using https:h1 | ||
UNDICI 16241: trailers received from GET https://nodejs.org// | ||
UNDICI 16241: connected to nodejs.org using https:h1 | ||
UNDICI 16241: sending request to GET https://nodejs.org//en | ||
UNDICI 16241: received response to GET https://nodejs.org//en - HTTP 200 | ||
UNDICI 16241: trailers received from GET https://nodejs.org//en | ||
``` | ||
|
||
## `fetch` | ||
|
||
This flag enables debug statements for the `fetch` API. | ||
|
||
> **Note**: statements are pretty similar to the ones in the `undici` flag, but scoped to `fetch` | ||
```sh | ||
NODE_DEBUG=fetch node script.js | ||
|
||
FETCH 16241: connecting to nodejs.org using https:h1 | ||
FETCH 16241: connecting to nodejs.org using https:h1 | ||
FETCH 16241: connected to nodejs.org using https:h1 | ||
FETCH 16241: sending request to GET https://nodejs.org// | ||
FETCH 16241: received response to GET https://nodejs.org// - HTTP 307 | ||
FETCH 16241: connecting to nodejs.org using https:h1 | ||
FETCH 16241: trailers received from GET https://nodejs.org// | ||
FETCH 16241: connected to nodejs.org using https:h1 | ||
FETCH 16241: sending request to GET https://nodejs.org//en | ||
FETCH 16241: received response to GET https://nodejs.org//en - HTTP 200 | ||
FETCH 16241: trailers received from GET https://nodejs.org//en | ||
``` | ||
|
||
## `websocket` | ||
|
||
This flag enables debug statements for the `Websocket` API. | ||
|
||
> **Note**: statements can overlap with `UNDICI` ones if `undici` or `fetch` flag has been enabled as well. | ||
```sh | ||
NODE_DEBUG=fetch node script.js | ||
|
||
WEBSOCKET 18309: connecting to echo.websocket.org using https:h1 | ||
WEBSOCKET 18309: connected to echo.websocket.org using https:h1 | ||
WEBSOCKET 18309: sending request to GET https://echo.websocket.org// | ||
WEBSOCKET 18309: connection opened <ip_address> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ class CompatFinalizer { | |
}) | ||
} | ||
} | ||
|
||
unregister (key) {} | ||
} | ||
|
||
module.exports = function () { | ||
|
Oops, something went wrong.