Organic-inorganic halide perovskite solar cells have demonstrated high power conversion efficiencies in recent years, yet operational instability and lack of durability are the major concerns preventing their commercialization at large scale. Previous studies reported a variety of factors that cause the degradation of perovskite materials and devices, including moisture, heat, oxygen, light illumination, and electric filed. However, to mitigate the stability issues, the fundamental understanding of physicochemical processes and degradation kinetics of perovskite materials are needed. Here, by coupling a temperature programmed desorption (TPD) system with a spectrally selective light source, we measure in-situ mass spectrometry of the evolved gas species during the thermal- and photo-induced degradation of organic-inorganic halide perovskites. We show that the volatile species such as ammonium (NH3), aminocarbyne fragments (CNH2), hydrogen (H2), and iodine/hydrogen iodide (I/HI) are released from methylammonium lead iodide (MAPbI3) or formamidinium lead iodide (FAPbI3) at different rates under 1 Sun of simulated solar illumination. Among them, I/HI vapors severely deteriorate perovskite films due to irreversible chemical chain reactions. The incorporation of Cs+ effectively suppresses the photoelectrosynthesis of I/HI gases and thus improves the photostability of the mixed-cation perovskites. Additionally, we investigate the dependence of photodegradation kinetics on incident photon energy by applying UV filters with different cutoff wavelengths to the light source. The results explain the interplay between the UV photons and photostability of perovskite films and elucidate the degradation mechanisms. Our findings suggest that compositional engineering of perovskite materials and UV filtering can prevent the photodegradation of the organic components and thus increase operational and long-term stability of organic-inorganic halide perovskite solar cells.