I need some answer for this interview question

if you have a subprogram of 1000lines codes that calculate salary that one of the salary calculated is not correct then how will you debug it

Having only the one record/raw in table( the one that it's not correct), run the code and
after each statement, display the output , to see if it's the one that you are expected.