A multiscale framework for localizing microstructures towards the onset of macroscopic discontinuity