An integral boundary-layer formulation is used to dynamically detect the occurrence of boundary-layer detachment if any, and its location on the airfoil surface. Weak separation or ‘boundary-layer thickening’ is modeled through viscous-inviscid interaction between the boundary-layer flow and the outer flow. The appearance of a singularity in the boundary-layer solution signals the occurrence of boundary-layer detachment, which should then be modeled through the release of discrete vortices. A separation criterion indicator Cse p, introduced in this research, is used to identify the appearance of a singularity, and hence to predict the time and location of boundary layer detachment. Results from the integral boundary layer method implemented are presented for a cylinder moved from rest, and the separation location and time are seen to compare well against published data. The present method is also applied to a NACA 0012 airfoil for Re = 10, 000 and fixed angles of attack, as well as for a set of pitching maneuvers with various rates of motion, using XFOIL and RANS CFD simulations as references. A converged solution for the viscous-inviscid interaction problem is shown to be possible without triggering Cse p at low angles of attack, and the method successfully predicts the occurrence of boundary layer detachment along with its position at high angle of attack.