The drug , commonly known as Viagra, is a regulated treatment mainly used to manage erectile dysfunction in men . Developed initially for heart conditions , its unexpected side effects relating to vasodilation led to its new application as an powerful solution for issues with sexual performance.