Search code examples
debuggingnext.jsfetch

How to turn on NextJS FETCH debugging in console. It was available in Next 13.4.4 and is gone in Next 13.4.19


I'm working on a NextJS 13 project and so far I was using 13.4.4 version. In the DEV mode (yarn run dev), there was a nice information about the currently handled FETCH requests from Next's fetch.

It was looking like this and was super useful for understanding what is going on with all the fetch requests and if there is a cache HIT or MISS. After updating to [email protected] it is gone. I am not sure what is the name of it and what to google for. enter image description here

I would highly appreciate your help!


Solution

  • Add this setting to next.config.js:

    experimental: {
      logging: "verbose",
    }
    

    I couldn't find documentation for it.

    Not sure which version supports it, but I upgraded to the latest (13.4.19) at the time of writing and it works there.

    It also seems that they plan to change it in the new version (13.4.20) to this format (source):

    experimental: {
      logging: {
        level: 'verbose'
      }
    }