Droplet breakup in systems with either a viscoelastic matrix or a viscoelastic droplet is studied microscopically in bulk and confined shear flow, using a parallel plate counter rotating shear flow cell. The ratio of droplet diameter to gap spacing is systematically varied between 0.1 and 0.85. In bulk shear flow, the effects of matrix and droplet viscoelasticity on the critical capillary number for breakup are very moderate under the studied conditions. However, in confined conditions a profoundly different behaviour is observed: the critical capillary numbers of a viscoelastic droplet are simi- E-mail: paula.moldenaers@cit.kuleuven.be 2 critical dimensionless droplet length, the critical capillary number and the dimensionless droplet length at breakup show a similar dependency on confinement ratio. As a result, confined droplets in a viscoelastic matrix have a smaller dimensionless length at breakup than droplets in a Newtonian matrix, which affects the breakup mode.Whereas confined droplets in a Newtonian matrix can break up into multiple parts, only two daughter droplets are obtained after breakup in a viscoelastic matrix, up to very large confinement ratios.