The effects of viscoelasticity on the dynamics and break-up of fluid threads in microfluidic T-junctions are investigated using numerical simulations of dilute polymer solutions at changing the Capillary number ($mbox {Ca}$), i.e. at changing the balance between the viscous forces and the surface tension at the interface, up to $mbox{Ca} approx 3 times 10^{-2}$. A Navier-Stokes (NS) description of the solvent based on the lattice Boltzmann models (LBM) is here coupled to constitutive equations for finite extensible non-linear elastic dumbbells with the closure proposed by Peterlin (FENE-P model). We present the results of three-dimensional simulations in a range of $mbox{Ca}$ which is broad enough to characterize all the three characteristic mechanisms of breakup in the confined T-junction, i.e. ${it squeezing}$, ${it dripping}$ and ${it jetting}$ regimes. The various model parameters of the FENE-P constitutive equations, including the polymer relaxation time $tau_P$ and the finite extensibility parameter $L^2$, are changed to provide quantitative details on how the dynamics and break-up properties are affected by viscoelasticity. We will analyze cases with ${it Droplet ~Viscoelasticity}$ (DV), where viscoelastic properties are confined in the dispersed (d) phase, as well as cases with ${it Matrix ~Viscoelasticity}$ (MV), where viscoelastic properties are confined in the continuous (c) phase. Moderate flow-rate ratios $Q approx {cal O}(1)$ of the two phases are considered in the present study. Overall, we find that the effects are more pronounced in the case with MV, as the flow driving the break-up process upstream of the emerging thread can be sensibly perturbed by the polymer stresses.