Abstract With BDS real data, three linearly independent combinations of extra-wide lane (0, 1, -1), (1, 4, -5) and sub-extra-wide lane (4,-2,-3) are chosen based on triple-frequency theory with the constraints of wavelength, factor of ionospheric delay and noise, and then the code-phase combination algorithm is adopted to detect and correct cycle slip. Experimental results show that the three combinations can even detect one small slip. Considering the probability of detecting a wrong slip, the ionospheric residual error method is proposed to assist in detection. That is, original observations are used to calculate the ionospheric residual error, followed by difference of the ionospheric residual delay between adjacent epochs. The results validate that the algorithm can detect and correct all kinds of single-differenced cycle slip in real time.