{
  "type": "module",
  "source": "doc/api/api-debug.md",
  "modules": [
    {
      "textRaw": "Debug",
      "name": "debug",
      "type": "module",
      "desc": "<p>Undici (and subsenquently <code>fetch</code> and <code>websocket</code>) exposes a debug statement that can be enabled by setting <code>NODE_DEBUG</code> within the environment.</p>\n<p>The flags available are:</p>",
      "modules": [
        {
          "textRaw": "`undici`",
          "name": "`undici`",
          "type": "module",
          "desc": "<p>This flag enables debug statements for the core undici library.</p>\n<pre><code class=\"language-sh\">NODE_DEBUG=undici node script.js\n\nUNDICI 16241: connecting to nodejs.org using https:h1\nUNDICI 16241: connecting to nodejs.org using https:h1\nUNDICI 16241: connected to nodejs.org using https:h1\nUNDICI 16241: sending request to GET https://nodejs.org/\nUNDICI 16241: received response to GET https://nodejs.org/ - HTTP 307\nUNDICI 16241: connecting to nodejs.org using https:h1\nUNDICI 16241: trailers received from GET https://nodejs.org/\nUNDICI 16241: connected to nodejs.org using https:h1\nUNDICI 16241: sending request to GET https://nodejs.org/en\nUNDICI 16241: received response to GET https://nodejs.org/en - HTTP 200\nUNDICI 16241: trailers received from GET https://nodejs.org/en\n</code></pre>",
          "displayName": "`undici`"
        },
        {
          "textRaw": "`fetch`",
          "name": "`fetch`",
          "type": "module",
          "desc": "<p>This flag enables debug statements for the <code>fetch</code> API.</p>\n<blockquote>\n<p><strong>Note</strong>: statements are pretty similar to the ones in the <code>undici</code> flag, but scoped to <code>fetch</code></p>\n</blockquote>\n<pre><code class=\"language-sh\">NODE_DEBUG=fetch node script.js\n\nFETCH 16241: connecting to nodejs.org using https:h1\nFETCH 16241: connecting to nodejs.org using https:h1\nFETCH 16241: connected to nodejs.org using https:h1\nFETCH 16241: sending request to GET https://nodejs.org/\nFETCH 16241: received response to GET https://nodejs.org/ - HTTP 307\nFETCH 16241: connecting to nodejs.org using https:h1\nFETCH 16241: trailers received from GET https://nodejs.org/\nFETCH 16241: connected to nodejs.org using https:h1\nFETCH 16241: sending request to GET https://nodejs.org/en\nFETCH 16241: received response to GET https://nodejs.org/en - HTTP 200\nFETCH 16241: trailers received from GET https://nodejs.org/en\n</code></pre>",
          "displayName": "`fetch`"
        },
        {
          "textRaw": "`websocket`",
          "name": "`websocket`",
          "type": "module",
          "desc": "<p>This flag enables debug statements for the <code>Websocket</code> API.</p>\n<blockquote>\n<p><strong>Note</strong>: statements can overlap with <code>UNDICI</code> ones if <code>undici</code> or <code>fetch</code> flag has been enabled as well.</p>\n</blockquote>\n<pre><code class=\"language-sh\">NODE_DEBUG=websocket node script.js\n\nWEBSOCKET 18309: connecting to echo.websocket.org using https:h1\nWEBSOCKET 18309: connected to echo.websocket.org using https:h1\nWEBSOCKET 18309: sending request to GET https://echo.websocket.org/\nWEBSOCKET 18309: connection opened &#x3C;ip_address>\n</code></pre>",
          "displayName": "`websocket`"
        }
      ],
      "displayName": "Debug"
    }
  ]
}