Owing to the absence of organic cations, all‐inorganic perovskite exhibits superior thermal and irradiation stability compared to organic‐inorganic perovskite. However, it is difficult for the traditional solution method to produce pinhole‐free and phase‐pure all‐inorganic perovskite films, which hinders its application. Here, a method of in situ A‐site cation exchange to synthesize CsPbBr3 films is introduced. The MAPbBr3 films are treated with CsAc solution to initiate cation exchange, where the intermediate product MAAc plays a crucial role in guiding grain growth during evaporation, resulting in the production of pinhole‐free and phase‐pure CsPbBr3 films. The self‐powered photodetector, based on compact and pinhole‐free CsPbBr3 film, exhibits excellent performance with an LDR of 126.7 dB, a detectivity of 1.1 × 1013 Jones, and a rise/decay time of 2.9/25.1 µs. Furthermore, the photodetector maintains over 90% of its original performance after a 2500 s irradiation test and a 30‐day air exposure test. Benefiting from the exceptional device performance and stability, the photodetector proves to be a valuable component in the laser eavesdropping system.