>>13206597Complementing
>>13206714 the collapse happens when you try to single out every photon. To know the position of every photon (through which slit the photon has passed) you need to interfere that photon, which means putting more momentum, which means messing with its trajectory.
That's why if you detect the photons by the slits, you won't get the interference pattern, and if you detect the interference pattern, you can't know through which slit the photon has passed.