I have a simple piece of code:
public string GenerateRandomString() { string randomString = string.Empty; Random r = new Rand
It's because you're creating two random objects at the same time. This is giving it the same seed, so you're going to get the same numbers.
When you debug it, there's time between the creation of the random objects which allow them to get different seeds.