How do I make localhost masquerade as real domain for development

I am working on a web app, and I'm using localhost references everywhere. Can I change my hosts file, or something like that, so that I can work with the actual domain name? Any drawbacks?

Solution: How do I make localhost masquerade as real domain for development

I think all you need to do is modify your hosts file.
If you are using windows, then this file is located in :
c:\windows\system32\drivers\etc
you will see that localhost is defined as 127.0.0.1
You can add another entry that says:
12.7.0.0.1 mydevsite