When stepping through a foreach loop during a debug session, you are likely to encounter some common issues such as determining where you are in the loop and navigating to a specific item in the collection. While Visual Studio does offer ways to answer these questions, they are far from easy. With OzCode’s innovative “Foresee” feature, dealing with foreach loops is simple and intuitive. Foresee is a debug visualizer that helps you keep track of where you are in the loop at all times and allows navigation to specific items in the collection. It gives you visual representation of the collection including items already iterated over, the current item and upcoming items. Interested in a particular item in the collection? Just right click on the item and choose ‘Run to item’ and the loop will execute and then break on the desired item. No need to setup and deal with conditional break points!

Is this article helpful for you?