Thoracoscopy is also called video-assisted thoracoscopy surgery. It's often used to repair a collapsed lung. It's also used to examine, biopsy, and stage a mass in the lung.