Formal:
* Avez-vous déjà été à Édimbourg? (This is the most direct and formal translation.)
Informal:
* Tu es déjà allé(e) à Édimbourg? (This is a more casual way to ask, using the informal "tu".)
* T'es déjà allé(e) à Édimbourg? (This is even more informal, using the slang "t'es".)
If you want to emphasize if the person has visited Edinburgh at some point in their life:
* As-tu déjà visité Édimbourg? (This is a more neutral option.)
Remember to adjust the gender of the verb "être" ("to be") to match the gender of the person you are asking.