A molecular-dynamics type simulation method, which is suitable for investigating the dewetting dynamics of thin and viscous liquid layers, is discussed. The efficiency of the method is exemplified by studying a two-parameter depinning-like model defined on inhomogeneous solid surfaces. The morphology and the statistical properties of the contact line is mapped in the relevant parameter space, and as a result critical behavior in the vicinity of the depinning transition is revealed. The model allows for the tearing of the layer, which leads to a new propagation regime resulting in non-trivial collective behavior. The large deformations observed for the interface is a result of the interplay between the substrate inhomogeneities and the capillary forces.