1. Switch to debug mode
2. Set breakpoints
This red one represents a breakpoint, indicating that the program will stop when it runs here.
3. Click Debug (shortcut key F5)
4. Didi here may have some students find that their dev c++ does not have a debugging interface and the following interface
That is, these two
solutions (if you have, please ignore this one):
Put a check mark in front of these two, and
two windows will pop up.
As long as you cancel the check mark on the top one, it will be automatically fixed to the left side.
The bottom one will be enlarged and stretched so that you can see it. After clicking ×, it will also be automatically fixed to the bottom.
5. Add viewing variables
Right-click on the variable to be viewed and add to view to dynamically view the change of this variable.