Debug.Log not printing all values in loop?

While trying to debug some code, I found that not all loop iterations were producing Debug.Log output. I put the loop in a separate class and observed the same behavior. The test class is this:

public class LooperTest : MonoBehaviour {

	// Use this for initialization
	void Start () {
		for (int i=1; i<4; i++) {
			for (int j=1; j<6; j++) {
				Debug.Log("loop");
				Debug.Log(i);
				Debug.Log(j);
			
			}
		}
	}
	
}

The output I get is:

loop

1

1

2

3

4

5

2

3

My guess is that some statements are being optimized away but I cannot find information on how to turn off loop optimizations in Monodevelop. Alternatively, perhaps not all the output is being flushed? Any advice would be appreciated as this issue has made debugging my code impossible!

It works for me. Is it possible that you have ‘Collapse’ active in the console? Disable it and it should be fine.