When implementing a non-continuous controller for a cyber-physical system, it may happen that the evolution function of the closed-loop system is not anymore piecewise continuous along the trajectory, mainly due to if statements inside the control algorithm. As a consequence, an unwanted chattering effect may occur. This behavior is often difficult to observe even in simulation. We propose here a set-membership method based on interval analysis to detect different types of discontinuities. One of them is the sliding surface where the state trajectory jumps indefinitely between two distinct behaviors. As an application, we consider the validation of a sailboat controller. We show that our approach is able to detect and explain some unwanted sliding effects that may be observed in rare and specific situations on our actual sailboat robots.