A fundamental understanding of the filament thinning of viscoelastic fluids is important in practical applications such as spraying and printing of complex materials. Here, we present direct numerical simulations of the two-phase axisymmetric momentum equations using the volume-of-fluid technique for interface tracking and the log-conformation transformation to solve the viscoelastic constitutive equation. The numerical results for the filament thinning are in excellent agreement with the theoretical description developed with a slender body approximation. We show that the off-diagonal stress component of the polymeric stress tensor is important and should not be neglected when investigating the later stages of filament thinning. This demonstrates that such numerical methods can be used to study details not captured by the one-dimensional slender body approximation, and pave the way for numerical studies of viscoelastic fluid flows.