Why does this while loop freeze unity?

Hello, I need help with a fix for my while loop as it crashes unity when I run it. This is what it looks like :

while (ifList.Count > 0) {
						Debug.Log ("while");
					}

It is contained within a coroutine so it should pause that coroutine until ifList contains nothing, right?
I clear the ifList at a later stage from another coroutine.

Please help.

No, it does not pause coroutine by any means. You are telling unity to simply spam debug.log in one frame infinitely. If you want to wait until ifList.Count is zero and check that only every fixed update, add yield return new WaitForFixedUpdate (); after Debug.Log.