One option is to set up your own DNS server and apply changes with dynamic DNS updates. You will likely still have to clear browser DNS caches due to DNS pinning. If you use a proxy, DNS is the proxy's responsibility (barring DNS prefetching issues in Chrome), so a proxy is the cleanest solution.
There are two HTTP proxies that can do this:
Fiddler is free, Charles is not, though it has a free time-limited trial.
In Chrome you can easily inspect and clear the DNS cache: chrome://net-internals/#dns
I don't believe there's any way for an extension to override DNS (though it can make DNS lookups).
With a proxy-switching browser plugin you can switch sites by enabling or switching proxy.
For completeness, there are two possible problems with this approach: cookies and caching. State or auth cookies on one server might not work on the other. New content on your test site might not appear because it has not expired, this depends on the caching settings in the server and content. Flushing the browser cache and cookies should do the trick if this occurs.
You can also have the opposite problem of content not being cached as expected because the web servers have different Etag
headers for the same static content. This doesn't usually cause a big problem, though it can get flagged in performance reports.
Since your current manual DNS switching approach will also potentially suffer from the above, they are probably not a problem for you, or you would have noticed already ;-)
(When possible I prefer to use an alternate approach to the whole problem which is usually cleaner: add virtual host aliases of "dev-www" "prod-www" "test-www" etc., though that sometimes has its own complications.)
Do you know if it still works on recent Firefox and OS versions? The comments on the plugin page make me worry. – Thilo – 2013-03-01T23:01:21.247
Added TemperHeader. – John Siu – 2013-03-02T05:52:34.277