Answer the question
In order to leave comments, you need to log in
The easiest and fastest way to identify the cause of a bug?
Given: Large recursive function of the form:
Функция "А"{
Цикл 1{
Цикл 2{
Вызов функции "А" в зависимости от условия 1
Вызов функции "А" в зависимости от условия 2
}
}
}
Answer the question
In order to leave comments, you need to log in
Write to the logs each iteration with a detailed description of what parameter the function was called with and what values of the counters the loops have. Then analyze the logs and see from what point the incorrect results of work begin.
Функция "А"{
// print_log('Вызов функции с параметрами: ')
Цикл 1{
// print_log('Цикл 1: итерация N')
Цикл 2{
// print_log('Цикл 2: итерация M')
Вызов функции "А" в зависимости от условия 1
Вызов функции "А" в зависимости от условия 2
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question