The basic problem of calculus of variations with pure state constraints of equality type in a non smooth setting is considered. Under suitable assumptions, a version of the Euler–Lagrange equation is obtained. Moreover, a generalization of the classical DuBois-Reymond lemma is proved in the presence of pure state constraints.