变更记录
序号 | 录入时间 | 备注
— | — | — | —
1 | 2017-06-03 | 新建文章
2 | 2018-02-28 | 更新引言
2 | 2018-04-14 | 整理格式
引言
你的代码,或者任何人的代码中总会有bug存在,你可以把调试看做是更好地理解代码的一种方式 —— By Advanced_Apple_Debugging_&_Reverse_Engineering_v0.9.5
The Debugging Process
Reproduce the problem
if you cannot reproduce the problem, then you (probably) do not understand it.
Gather Debug Information
Logs, program, state,…
What is the value of a variable?
What kind of error?(ex.EXC_BAD_ACCESS)
What line of code caused the error?
Which functions or methods led to the error?Form a Hypothesis
Try a fix
Maximize the information gained per fix!