for example I debug my local website this way
Is there a program that would make a more convenient alias for it like for example
forcing my browser to use my local files and not the ones online?
I find 'localhost' easier to type, fewer keystrokes! It gives you a chance to imagine life before TLDs!
To accomplish what you're asking, you can add a line to your Hosts file like:
This would skip DNS lookup for example.com and go straight to your local IP. For the location of the Hosts file on your system, check out the corresponding Wikipedia article.