Add debug branch loop