You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm used to debug my NextJs app using the DevTool, also for the Server-side code.
So I run NODE_OPTIONS='--inspect' next dev and then I connect the DevTool with chrome://inspect - Reference.
What I've noticed is that on the terminal where I run NextJs I can see the following logs, in particular the one related to the fetch:
Debugger listening on ws://127.0.0.1:9230/03b84594-de9a-4cfe-afc1-f57df72eb6e0
For help, see: https://nodejs.org/en/docs/inspector
the --inspect option was detected, the Next.js router server should be inspected at 9230.
▲ Next.js 15.2.3 (Turbopack)
- Local: http://localhost:3000
- Network: http://192.168.1.59:3000
✓ Starting...
Debugger attached.
✓ Ready in 925ms
Starting inspector on 127.0.0.1:9230 failed: address already in use
○ Compiling / ...
✓ Compiled / in 939ms
GET / 200 in 1554ms
│ GET https://api.vercel.app/blog 200 in 244ms (cache skip)
│ │ Cache skipped reason: (auto no cache)
✓ Compiled /favicon.ico in 341ms
GET /favicon.ico?favicon.45db1c09.ico 200 in 388ms
but the same is not true for the Console in the DevTool:
Question
Why can't I see the fetch log information in the Chrome DevTool, but I can see it from the terminal?
Why do we have this behavior, the logging of the fetch is not printed using the console.log?
Many thanks
Additional information
# Howtoreproduceit1.StartfromafreshNextJsInstallation-I'm on next `15.2.3`
2.Addtheinspectoption[Reference](https://nextjs.org/docs/pages/building-your-application/configuring/debugging#server-side-code)-`"dev": "NODE_OPTIONS='--inspect' next dev --turbopack",`3.Addtheloggingoptionforthefetchin`next.config.js`-[Reference](https://nextjs.org/docs/app/api-reference/config/next-config-js/logging#fetching)module.exports={logging: {fetches: {fullUrl: true,},},}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Context
I'm used to debug my NextJs app using the DevTool, also for the Server-side code.
So I run
NODE_OPTIONS='--inspect' next dev
and then I connect the DevTool withchrome://inspect
- Reference.What I've noticed is that on the terminal where I run NextJs I can see the following logs, in particular the one related to the fetch:
but the same is not true for the Console in the DevTool:
Question
Why can't I see the fetch log information in the Chrome DevTool, but I can see it from the terminal?
Why do we have this behavior, the logging of the fetch is not printed using the
console.log
?Many thanks
Additional information
page.tsx
npm run dev
Beta Was this translation helpful? Give feedback.
All reactions