Debug test code - limit iterations in trace loop