A contact lens (120) for use with a surgical microscope may be equipped withan anti-fogging device (200) to preventobscuring the view of a surgeon due to condensation during ophthalmic surgery.The anti-fogging device may deliver thermal energyto a surface of the contact lens to heat the contact lens above an ambient dewpoint. The thermal energy may be delivered by an airduct with a fan nozzle, a fluid duct in thermodynamic contact with the contactlens circulating a heat transfer fluid, or generated withelectrical energy to an electrical heating element (202) disposed on thesurface of the contact lens. The thermal or electrical energy maybe delivered via a handle for supporting the contact lens during surgery.