The fogging prevention device 6 includes a heating element 62 for applying heat to the optical member, a temperature sensor 63 for detecting the temperature, a wiring substrate 61 having a mounting surface 6111 including the heating element 62 and the temperature sensor 63, a constitution And a sealing member that is applied to the mounting surface 6111 and seals the heat generating element 62 and the temperature sensor 63. At least part of the mounting surface 6111 is provided with a bonding portion 65 which is made of an inorganic material and extends along the outer edge of the mounting surface 6111 in a state of being exposed on the side surface of the wiring substrate 61 so as to contact the sealing member There.曇り防止装置6は、光学部材に熱を付与する発熱素子62と、温度を検出する温度センサ63と、発熱素子62及び温度センサ63を備える実装面6111を有する配線基板61と、樹脂材料から構成され、実装面6111に塗布されて発熱素子62及び温度センサ63を封止する封止部材とを備える。実装面6111の少なくとも一部には、無機材料から構成され、配線基板61の側面に露出する状態で当該実装面6111の外縁に沿って延び、封止部材に接触する接合部65が設けられている。