0
Fixed

Total iteration count not displayed when foreach target is 'inline'

James Manning 6 years ago • updated by Omer Raviv (CTO) 6 years ago 1
It worked fine with the Enumerable.Range was written to a local variable.

sshot @ http://i.imgur.com/0kl93.png

Thank you for the report!


The bug actually wasn't that it the count is not displayed when the foreach target is 'inline', but rather that's it's even shown at all for this foreach target. This was fixed in version 0.5.1620.7215.


We intend to provide better documentation for this on our website, but I'll explain here for now: the reason BugAid doesn't show the total iteration count in this instance is that in order to do so, BugAid would have to re-iterate the IEnumerable. Doing that may have undesired consequences (such changing the program's state, making a call to a database, etc). The only case in which we re-iterate the IEnumerable without asking the user for permission is if doing so cannot have any side effects whatsoever - like, for example, if the foreach target is a known .NET collection such as List or Dictionary. In other cases, "???" will see the total iteration count, and you'll have to open to foreach window and push a button to re-iterate the IEnumerable and see the collection data. You'll see a warning that doing so may cause side effects.