Localghost is an open source app which makes it easy to switch development host names to resolve to localhost with a status item that adds / removes entries from /etc/hosts.
Once Localghost starts you`ll see a preferences menu where you can add the hosts that you use for development. Once added they`ll appear in the Localghost status menu and can be turned on and off with one click (well, almost, it`ll ask for your password once per session).