How do I complete 500 of the same assignments in the Visual Studios Immediate window?

I have finally managed to reproduce a very elusive bug. I have Visual Studio related to a process. To continue debugging it, I need to do the same job on about 500 items in the collection, something like this:

for (int i = 0; i < coll.Length; i++)
    coll[i].Something = coll[i].Other;

      

for

is not legal in the nearest window. None of them insert multiple statements. Is there a way to do this that is not related to using AutoHotkey etc.

+3


source to share


1 answer


I don't think it's a good idea to do this in the immediate window - you can reproduce the error multiple times, so you need to keep that statement over and over. Better try to create an automated test that contains the above instructions as part of preparing test data.



+1


source







All Articles