Debugging Next.js App in Production

Bug(s) in production NextJS app

To Do App
"/": ["static/chunks/pages/index-b1a6b3cf2be8bc12f539.js"]

Debugging Backend APIs

About Requestly

Solution

Redirect Production JS To Local

Setting up Requestly

Redirect Rule — Redirect Production API End Point to Local API Endpoint

Now Debugging JS Code on Production

https://sample-nextjs-app-flax.vercel.app/_next/static/chunks/pages/index-b1a6b3cf2be8bc12f539.js

Request URL “WildCard Matches” https://sample-nextjs-app-flax.vercel.app/_next/static/chunks/pages/index-*.js

Destination — https://localhost:3000/_next/static/chunks/pages/index.js

Requestly Redirect Rule (Redirect Production JS to localhost JS)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Requestly

Requestly

Setup redirects, modify headers, switch hosts, insert user scripts and much more. Install it on Chrome & Firefox and join our family of more than 100,000 devs!