Context. The pyramid was proven to be a highly sensitive and versatile wave-front sensor (WFS) and has been selected to be installed on the single conjugate adaptive optics (AO) systems of the extremely large telescope (ELT). The pupil of the ELT is fragmented by the secondary support spider arms, which are larger than the spatial coherence length of the atmospheric turbulence. This causes a rupture of the incoming wavefront continuity, which means that we need to be able to measure the differential pistons across the spider arms to achieve full wavefront reconstruction. Aims. We investigate the reaction of the modulated pyramid WFS to discontinuous aberrations in presence of phase residuals after AO compensation for a range of expected observing conditions at the location of the ELT. We then explore some parameters of the sensor in order to improve its sensitivity to the wavefront discontinuities, including optical gain compensation, specific sensor modulation paths, and the number of faces of the pyramidal prism. Methods. We derived sensitivity loss and modal cross-talk strength coefficients around static post-AO residual phases using the COMPASS end-to-end AO simulation software. Moreover, extensive closed-loop AO simulations let us derive two wavefront error criteria that are appropriate for a fragmented pupil geometry. We used these to assess the wavefront reconstruction performance. Results. We show that on the ELT, the pyramid experiences a drastic loss in sensitivity and also non-linear modal cross-talks. Added to the limited capture range, this makes it poorly suited for phase discontinuity measurements at visible wavelengths. The strategies we studied to increase the sensitivity and reduce the modal cross-talk provide an improvement of the reconstruction for low D/r0(λWFS) values, that is, for a K-band pyramid. In presence of a large residual wavefront variance, however, a similar sensor in visible light fails to provide the necessary trade-off to measure both the continuous modes and the wavefront discontinuities. Conclusions. The ELT instruments, designed with only visible-band pyramid WFSs, will not be able to perform a direct measurement of the wavefront discontinuities. They will have to rely on Kolmogorov statistics to restore the continuity of the atmospheric corrugated wavefront. If any other source of discontinuities arises on the ELT, instruments will need an additional, dedicated WFS.