I was going to say it sounds like a memory issue, but you say the same thing happens with downloaded examples that presumably wouldn't be in that ballpark.
What happens if you create a new "Hello, World" example? Does that work in Debug mode?
Years ago I used to experience the B4A Bridge failing on me, usually when a deadline was hours away, and there was nothing that would get it going again except for time. It'd stop working, and then the next day it'd start working again, all for no apparent reason. I figured it was a network caching issue, and that whatever it was has been fixed with a work-around somehow, because it hasn't happened for the past couple of years.