Amorphous glassy polymers have an extensive use in the industrial sectors including micro-electronics, medical industry and aerospace, therefore their design and usage have become a significant task nowadays. The fracture response of these polymers may vary from ductile to brittle depending on several factors such as entanglement density, temperature level and external loading rate. The ductile response is driven by diffuse shear zones exhibiting volume–preserving inelastic deformations while the brittle response is manifested by very small crack-like defects composed of a sequence of fibrillar bridges separated by micro-voids, thereby connotating void formation consisting of nucleation and propagation steps. The presents study is focused on the description of shear yielding and crazing phenomenon in terms of their respective evolution equations. In addition, an extension towards the modelling of the fracture is employed via the crack phase–field approach, considering ductile and brittle failure simultaneously. This is provided by the novel failure criterion that features a critical amount of plastic strain and void volume fraction. Since the proposed approach unitedly models the macroscopic crack initiation and propagation for ductile or brittle failure, it is asserted to be more physically grounded compared to present models in the literature. Constitutive formulations for shear yielding, crazing, and void volume fraction are derived with their specific forms starting with the local and conductive component of the dissipation inequality. The performance of model is evaluated after developing the local and global Newton–type update algorithms for the dissipative internal and primary field variables, respectively and it has been analysed by fitting of several experimental data of homogeneous and inhomogeneous tests. The findings reveal the remarkable temperature dependency on the type of failure as well as the interaction between loading rate and temperature change owing to dissipative heating in the solid.