I am trying to prove the theorem
A language is Turing-recognizable iff some enumerator enumerates it.
I proved the "if" part, but I have no idea of proving the "only if" part, so I searched a proof for the "only if" part of this theorem. In the proof that I found, it says
Let $\sum$ be the alphabet of the Turing machine $M$, and let $s_1$, $s_2$, ... be a list of all possible strings of $\sum^{*}$. We define the enumerator $E$ as follows:
1. Run $M$ for $i$ steps on each input $s_1$, $s_2$, ... , $s_i$.
2. If any computation of $M$ accepts, print out the accepted string.
In this proof, I can't understand why do we need to run $M$ for only $i$ steps. I think the number of simulation steps may not be enough to simulate strings. Is it guaranteed that simulating $M$ finishes in $i$ steps?