shift+F10:编译

shift+F9:调试按下调试后,在Intellij下方出现如下的界面


F9:调试窗口的小三角,执行到下一个断点

F6:逐过程step over(如果当前行有方法调用,这个方法将被执行完毕返回,然后到下一行)

F5:逐语句step into向下执行一行。如果该行有自定义方法,则运行进入自定义方法(不进入官方类库的方法)

alt+shift+F7:Force step into调试的时候能进入任何方法。

F7:step out,确定某个方法没有问题时,跳出该方法

Drop Frame:返回某个方法的调用处重新执行,相当于撤销

ctrl+shift+F8:view breakpoints查看断点,可以设置一些属性,比如

这里可以设置x>1,表示x>1时暂停程序,用在对【循环】的调试比较方便

在此处右键点击x可以【set value】,在调试时直接设置x的值,用在对【条件语句】的调试比较方便

这里再说一下step into 与force step into的区别:
step into会进入你自己写的方法。
而force step into能够进入所有的方法,比如jdk的方法。
随便写一个试一下就知道了,如下图:

step into就会直接过去。
而force step into就能进到substring方法中。
总结:
f8跳到下一个断点 ***在web情况下一直按不用再重启服务器,会再次进入这个断点
f6--stepover是不会进入方法的
f5--step in进入方法
f7--step out跳出方法
alt+shirt+f7强制进入某个方法,看源码?
drop frame相当于撤销 ******
alt+f10 show execution point 跳转到当前断点的地方
alt+click/右键:查看对象的值 或者鼠标悬停两秒
在断点右边进入的条件,比如在if(x==1x||x==0)设置x=3的时候才进入这个方法
run to clusr避免设置断点,直接跳过for循环
watch里面查看变量/拖到这里面 或者 execute expression variable
网友评论