Answer:
I would say : know what the code should do
Step-by-step explanation:
First you should know what is the code supposed to do and then identify the problem to be able to isolate the source of the problem, after that you can either fix the error or find a way to work around it.