Your local environment is not the same as localhost. Having your dev environment set up like a production env from this point of view doesn't mean you don't have a remote test env, it means you can debug stuff that only break on that test env or even better that you finish your work without that problem even showing up.