With your change we can get multiple lines of output, that have to be split into an array to work correctly in any cases as discussed before.
This will take some time (not really much, but that depeon the system's load and speed).
Then we loop through the array and send it to ParseOutput.
While this happens it might be that we reach another EVT_PIPEDPROCESS_STDOUT, EVT_PIPEDPROCESS_STDERR or EVT_TIMER, because the debugger process runs asynchronously, the timer should do this also of course.
So it might happen, that we are just parsing a large amount of output, while we get another event with content to parse, or am I missing something.