A biopsy may be done during an endoscopy. A biopsy is a sample of tissue taken during an endoscopy. The sample is then examined under a microscope. A biopsy can tell if there is damage done from acid or if there is another problem.