Debugging loop