What Is a Corneal Ulcer ... microscope called a slit lamp to look for problems. If your doctor thinks you have an infection, they may take a small sample from the ulcer for analysis in a lab.