When a measurement (here: detect through which of the two slits the particle travels) influences the wave function of the electron. The wave function collapses and the superposition of states is gone. This means that on the screen we will see two lines where particles hit the screen, no wave interference pattern anymore.