C Single step debugging in programming

Updated on technology 2024-03-21
3 answers
  1. Anonymous users2024-02-07

    The steps for debugging the C language are as follows:

    Debugging C programs in Keil: 1. Open our program and click Start StopDebug on the right side of the menu barbutton to enter debugging mode.

    2. The left side is the register window, and the upper right side is the assembly window, we can see the value of each register and the assembly corresponding to the C language**. 3. Click the single-step execution button or click F11 and F10 to enter the single-step execution mode, which is convenient for us to see the program flow and execution steps. 4. Click the serial port button in the menu bar, we will debug the output of the serial port, there are many corresponding debugging tools to choose from.

    5. Single-step execution, we see the changes of each window, when going straight to the output, we can see that the serial port window has the corresponding character output. 6. Click the Start Stop button again to stop debugging.

    Use VS2012 to debug the C language: 1. Click on a vertical empty space on the left side of the programming environment, and click on the corresponding statement you want to debug. 2. Click on the debugging interface in the toolbar at the top of the window, and click on sentence by sentence or process, it doesn't matter.

    3. Start debugging, in the debugging process, each debugging statement should be pressed once F5 key, press on the keyboard, you can see that in the current statement, there is an arrow in the red dot on the left. 4. In each debugging statement, when the variable value changes, the small interface below will be displayed to see if it is correct. 5. Repeat this step until you know where you find the wrong place.

    6. After the error is found, stop the debugging and modify the corresponding **, that is, complete the debugging.

  2. Anonymous users2024-02-06

    Single-step debugging refers to a debugging method usually used in program development to find the bugs of the program, track the process of program execution step by step, and find the cause of the error according to the value of the variable.

    Here's how to solve the problem and solve it:

    1. First of all, you need to set the breakpoint at the first point of the first line of ** to tease and cover the imitation, a red ball will appear, which represents the success of setting the breakpoint, and a total of 4 breakpoints are set in the following figure.

    2. After setting the breakpoint, press F5 to start the breakpoint debugging, and a yellow arrow will be added to the red ball where the breakpoint goes.

    3. Continue to press F5, the program will be executed downwards and stop when it reaches the next breakpoint.

    4. Continue to press F5, when the set breakpoint does not meet the conditions, it will not walk in, but continue to execute and jump to the next breakpoint.

    5. In addition, when you reach a certain breakpoint, you can change the value of the current variable in real time.

    6. When you don't need to step through the debugging, click the icon shown in the following icon to delete all breakpoints.

    7. After deletion, the red dot disappears, so that the problem is solved.

  3. Anonymous users2024-02-05

    Upstairs answered pretty much the same, there are two situations of single-step debugging: f7 and f8, as for the specific difference between the two, you go and try it yourself, it is more effective than I told you, and you will understand it better!

Related questions
4 answers2024-03-21

for(i=3;i<=ihuffsize[n-1];i++)uint_8s[0]=0;

uint_8s[1]=uint_8[p]; >>>More

7 answers2024-03-21

#include

using namespace std; >>>More

20 answers2024-03-21

That's it, this belongs to the parameter transfer between forms, there are many ways! >>>More

8 answers2024-03-21

Reads characters and counts to'\0'Come to an end!

5 answers2024-03-21

CEC, the full name is consumer

electronics >>>More