If we were to put sensors next to the slits to observe the path of the electron, the wave function of the electron would collapse at that point and wouldn’t be a a superposition of both possibilities. Which means that no interference patterns would be present and the intensity pattern would simply be 2 two lines, as you would expect from a classical system.