The standard tool used for detecting peptic ulcers is an upper endoscopy. This is a procedure where a flexible camera is passed through the esophagus into the stomach and first portion of the small bowel for a visual assessment. If an ulcer is found, a biopsy can be performed to assess the inflammatory cells and help your healthcare provider determine the cause of the ulceration. If there is active bleeding, during an endoscopy, the provider can perform certain maneuvers to stop the bleeding.