1. A function that requires one-step debugging is called in the script (a very important step). Since Python is an interpreted language, you need to tell the system that you are using this function when you are doing one-step debugging, and stepping into the function that you need. As shown, we define the CreateDataSet () function, which is called in the script before debugging, which is the red marked part.
2. Add Breakpoints. As with the rest of the programming languages, add breakpoints to the statement you want to see the results in, and add the aspect of double-clicking before the statement or clicking the F12 button when the statement is selected. The effect is as shown.
3, according to the different needs of programmers to debug. The Spyder provides an adjustable panel,
The first button is to debug the button, click or press CTRL+F5 to enter the mode, the program reaches the first breakpoint you set, this step is necessary for the mode, the second is a single-step button, click or press CTRL+F10 to set the breakpoint after the single-step The third button can enter the inside of the function body contained in the sentence where the cursor is located, or press the shortcut key ctrl+f11; the fourth one jumps from this function, the fifth one jumps to the next breakpoint, and the last button stops debugging.
After clicking to debug, you can see the variable information in the location shown.
Stepping through Python with the Spyder compiler