Modern drug therapy for ED made a significant advance in 1983, when British physiologist Giles Brindley dropped his trousers and demonstrated to a shocked Urodynamics Society audience his papaverine-induced erection. The drug Brindley injected into his penis was a non-specific vasodilator, an alpha-blocking agent, and the mechanism of action was clearly corporal smooth muscle relaxation. The effect that Brindley discovered established the fundamentals for the later development of specific, safe, and orally effective drug therapies.[better source needed][better source needed]
Your doctor will ask you questions about your symptoms and health history. They may do tests to determine if your symptoms are caused by an underlying condition. You should expect a physical exam where your doctor will listen to your heart and lungs, check your blood pressure, and examine your testicles and penis. They may also recommend a rectal exam to check your prostate. Additionally, you may need blood or urine tests to rule out other conditions.
With sex therapy, your counselor looks at the sexual problems you and your partner are having. Sex therapy works with problems such as performance anxiety, which means that you worry so much about whether you will be able to have sex that you are not able to. It also helps when you have erection problems that are not due to physical or drug problems, or premature ejaculation (you come too quickly). It may help you to reach orgasm or to learn to relax enough to avoid pain during sex. Counseling can help you to adjust to the treatment you and your doctor choose.
Common side effects from testosterone medication include acne, swelling, and breast enlargement in males. Serious side effects may include liver toxicity, heart disease, and behavioral changes. Women and children who are exposed may develop virilization. It is recommended that individuals with prostate cancer not use the medication. It can cause harm if used during pregnancy or breastfeeding.
If a trial of oral ED therapy and withdrawal of offending medications prove to be ineffective in restoring erectile function, it is appropriate for most primary care practitioners to consider referral to a specialist for additional evaluation and discussion of alternative treatment options. These include intracavernous injection therapy, vacuum constriction devices, intraurethral therapy, and possible surgery.
"Stress and anxiety can adversely affect sexual performance and are common causes of erectile dysfunction,” warns Feloney. “Feelings of stress and anxiety can also lead to depression and a loss of interest in sex." It's important to get these feelings out in the open where you can deal with them. Issues that can lead to erectile dysfunction include fear from previous bad experiences with sex, family or work related stress, poor communication with your partner, and unrealistic goals and expectations.
A common and important cause of ED is vasculogenic. Many men with ED have comorbid conditions such as hyperlipidemia, hypercholesterolemia, tobacco abuse, diabetes mellitus, or coronary artery disease (CAD).  The Princeton III Consensus recommends screening men who present with ED for cardiovascular risk factors; ED may be the earliest presentation of atherosclerosis and vascular disease. 
Capogrosso, P., Colicchia, M., Ventimiglia, E., Castagna, G., Clementi, M. C., Suardi, N., ... Salonia, A. (2013, July). One patient out of four with newly diagnosed erectile dysfunction is a young man — worrisome picture from the everyday clinical practice. The journal of sexual medicine. 10(7), 1833–1841. Retrieved from https://onlinelibrary.wiley.com/doi/full/10.1111/jsm.12179