Breakponts are great for complex situations where you are counting though data in array or nodes or any other type of data structure.
Also this is great for debugging your code.
Below is steps of how to set breakpoints in your code and view what the code is doing in Visual Studio.
- You can add a breakpoint by clicking side bar next to line of code. As image below
- Then run your program
- Open locals tab
- You can see your array and what it has in it by inspecting local variables like below
See this link for more info on viewing whats in your array in visual studio
Step though code by pressing F10 which it will then change array
- You can now see how you get a better understanding of what code is doing by stepping though your code
See this link for more info on setting breakpoints in visual studio
Happy Coding :)
If this helped you consider buying me a coffee :)