深入学习 Intellij IDEA 调试技巧
- 2019 年 10 月 3 日
- 筆記
???????????????????????????? BUG???????? BUG????? IDE ????????????????????????????????????
? IDEA ??????????????????????????????????????????????????????????????????????????????????????? IDEA ???????? IDEA ???????????????????
Step ????
?????????????????bug??????????????????????????????????????
IDEA ?????? Step ?????????????? Run ??????? Step ???
?????????????????????????????
????????????????? Setp Over?Setp Over ???????????????????????????????????????????
?????????????? Step Into ?Step Into ???????????????????????? java.*
????????????????? Setting-Stepping
???,??????
??????? Force Step Into??????
????????????????? Step Into ???????Step Into ??????????????????????????????????
??????????? Smart Step Into ,?????????
??????????????????? Setp Out?????????????????
????? for/while ???????????????????????????????????????????????????? Setp Out Of Code Block???????????
??????
????
????????????????????????????????????????????????
? IDEA ???????????????????????????????????????????????????? Ctel + Alt + Shift +F8 ?????????????? ALt
??????????
????
????????????????????????????????????????????
??????????????????????? condition ??????IDEA ??????????????????
??????????????????
?????
??????????????????????????????????????????????
??????????????????????? thread1
??,???? thread2
??????????????????????????????????????????????????????,??????????
????????????????????
??????????????????????? Suspend ?? Thread ???????????????????? Frames ???? thread1
?thread2
?????????????????????????? thread1
?????????thread2
?????? thread2
.
?????????????????????? Make Default ??????? Suspend???
??????
???????????????????????????????????????????????????????????????????????????????????????????????????????????
IDEA ????? Drop Frame ? Force Return ???????
Drop Frame
Drop Frame ????????JVM ??????????????????????????????????????????????????????????????????
?? Drop Frame??????????????????????
????????????????? Drop Frame??????????????????????????????????
Drop Frame ???????????
??? Step Out ????? Step Out???????????????????
Force Return
Force Return ???????????????????????????? Frames ???
?? Force Return?????????