How to Debug the issues directly with Prod/UAT Content via localhost (SDL Web 8 + DXA applications)

Few times we are @ some situations like we are not able to reproduce some errors in lower environments but the issues exists in Production, it's hard to replicate the same.. in recent times we had an issue of Amazon Search not working in Prod... in order to reproduce the same had connected directly to Prod from Localhost - I think Most of them aware but would like to share if it helps few people...

For Connecting to UAT Stage or Live, or Prod Live or Stag - from local host, just we need to update/point the discovery service url in web.config to respective one and with cduser and pwd and try to hit the page:


i have tried to hit the prod live - so i have pointed my Discovery service url to prod live with user and pwd in web.config, added one more binding i.e. 82 port.(IMP: We need to enable the port by taking the help from Cloud Team)

and one more is - we have to install the IIS rewrite rule module (or) comment the rewrite tags if any from web.config then only it's works...localhost:82/en

NOTE: My system IP should be whitelisted to work without VPN otherwise, we need to connect via VPN to work

 

That's it .. now we are good to go to debug directly on either Prod or UAT & Do the Stuff...