pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

1.debug,全部打印

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

2.打断点debug,出现单步调试等按钮,只运行断点前

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

3.setup over 调试一行代码

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

4.setup out 运行断点后面所有代码

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

5.debug窗口显示调试按钮

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

6.运行到对应的点会显示变量的值

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

7.step into:单步执行,遇到子函数就进入并且继续单步执行(简而言之,进入子函数);

step over:在单步执行时,在函数内遇到子函数时不会进入子函数内单步执行,而是将子函数整个执行完再停止,也就是把子函数整个作为一步。有一点,经过我们简单的调试,在不存在子函数的情况下是和step into效果一样的(简而言之,越过子函数,但子函数会执行)。

step out:当单步执行到子函数内时,用step out就可以执行完子函数余下部分,并返回到上一层函数。

按shift+F9进入debug

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

运行到c=add(a,b),点击step into 进入子函数

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

一种方式:点step into 一步一步运行完子函数然后跳出子函数回到主函数

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示


第二种方式,点 step out  一次性执行完所有的子函数add步骤跳出子函数到主函数

pycharm debug后会出现 step over /step into/step into my code /force step into /step out 分别表示

step into my code 实测貌似和step into 没啥区别,都是遇到子函数要进入子函数里面一步一步执行走,再跳出来执行主函数。

哪位大神知道区别希望不吝赐教。

run to cusor  实测是清空了调试变量信息,感觉没啥用,哪位大神知道区别希望不吝赐教。