Use DEV C++ to debug the program

1. Switch to debug mode

insert image description here

2. Set breakpoints

insert image description here
This red one represents a breakpoint, indicating that the program will stop when it runs here.

3. Click Debug (shortcut key F5)

insert image description here

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
insert image description here
solutions (if you have, please ignore this one):

insert image description here
Put a check mark in front of these two, and
two windows will pop up.
insert image description here
As long as you cancel the check mark on the top one, it will be automatically fixed to the left side.
insert image description here
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.
insert image description here

insert image description here

6. Click this next step to debug the program step by step

insert image description here

Guess you like

Origin blog.csdn.net/sweetqp/article/details/115771760