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